This site requires JavaScript, please enable it in your browser!
Greenfoot back
mik
mik wrote ...

2011/8/25

Now here's a challenge...

1
2
3
4
5
6
AwesomeNameGuy AwesomeNameGuy

2011/9/18

#
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!
kiarocks kiarocks

2011/9/18

#
no, it is every time velocity.getX() or getY() is <= 5.
AwesomeNameGuy AwesomeNameGuy

2011/9/18

#
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.
kiarocks kiarocks

2011/9/18

#
so, a solid line?
AwesomeNameGuy AwesomeNameGuy

2011/9/18

#
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.
kiarocks kiarocks

2011/9/19

#
Umm, I need to try the vect thing. Help please???
AwesomeNameGuy AwesomeNameGuy

2011/9/19

#
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.
kiarocks kiarocks

2011/9/30

#
AwesomeNameGuy, do you have a solution yet?
dangjavageek dangjavageek

2011/9/30

#
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?
Duta Duta

2011/9/30

#
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.
AwesomeNameGuy AwesomeNameGuy

2011/10/2

#
@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...
Duta Duta

2011/10/4

#
@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 :)
Duta Duta

2011/10/4

#
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.
kiarocks kiarocks

2011/10/4

#
Unfortunately, i believe any thing you draw-transparent or not-gets white to make it rectangular
kiarocks kiarocks

2011/10/4

#
i was wrong-transparency set!
There are more replies on the next page.
1
2
3
4
5
6