I would guess that you are drawing a dot every frame which leaves me wondering why I am seeing gaps in the line. I might check out the code later today or tomorrow and see if I can figure it out. But way easier than drawing a dot every time interval or drawing easier spaced dots, and produces a nice looking line as well!
no, it is every time velocity.getX() or getY() is <= 5.
Just a guess. Well, I suppose that explains the gaps! The line looks pretty nice, but you might want to find another way to get rid of the gaps.
What I meant was that there were gaps in the line of dots, that is there were streaches where no dots were drawn. So I still think a dotted line is best, but there shouldn't be large regions where there are no dots.
Umm, I need to try the vect thing. Help please???
Well it's not going to be the easiest thing but I'll take a look at it and see if I can't figure it out.
AwesomeNameGuy, do you have a solution yet?
Has anyone experimented with connecting a Java 2d physics library to Greenfoot yet? Something like http://www.jbox2d.org/v2demos/index.html catches my eye and it seems like all the things in Angry Birds (after you shoot the bird, the wood / blocks / tnt boxes / etc. are still live and responding to gravity and surrounding items / surfaces at all times) have similar physics interaction but I have not looked at any particular 2d physics library yet to see if it would make sense to integrate that into a Greenfoot scenario yet. Anyone else had a go?
I reckon it'd be better to try and do it without resorting to that... could do though I guess. Then again I haven't checked if it would even work.
@kiarocks sorry it's taken me so long to reply back. Anyway, I did look at it, but I think if I tried to make the dots evenly spaced even if the idea did work it would probably end up taking all day to program, and i'd rather just do something else to be honest. If it were up to me, i'd just draw a dot every frame, it looks good that way anyway. I might come back and do some more work on this, but I'm not sure what to work on at the moment. I wonder if mik has any more suggestions on how to proceed. I'm all ears...
@AwesomeNameGuy I agree - the non-evenly spaced dots give an indication of speed as well, and I think they look better than if you were to just have them every x distance.
What tasks need doing on this project still? I'm not amazing at programming but I'd like to at least try to lend a hand :)
Oh, also I remember (from when I looked at this thread a little while ago) that someone had changed the objects that you throw to hamsters, however they looked bad especially when they overlapped, due to the fact that instead of surrounding the hamster with transparency, whoever got the image (@kiarocks I think? Might be misremembering) surrounded them with white. If you're unsure how to do this (change it to transparency), simply open it in... Well personally I quite like Adobe Fireworks but you can use many image editing tools, use what is generally down as a "Magic Wand" tool, and delete the white area. Then, obviously, save it as a PNG.
That might have been irrelevant (They might have updated the project since I last saw it for instance, and fixed this), but I thought I'd post it anyway in case.
Unfortunately, i believe any thing you draw-transparent or not-gets white to make it rectangular
i was wrong-transparency set!