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

MTK's Comments

Back to MTK's profile

MTKMTK

2009/11/26

Very nice!
MTKMTK

2009/11/26

Very nice!
That seems like a good way to do collisions.
I see that when I don't use super.setLocation, collision doesn't work at all, but when I do, it works as if the object is against the wall (when is is actually far out of view), which would to some serious bugs in even a simple game.
Builderboy2005: There is a fix for draging the object between acts. In the setLocation method, put in a call to super.setLocation(#,#) and then set your variables. This also helps with collision detection i believe. If Greenfoot thinks the objects are against the edge when they are actually far away, won't collision detection be all wrong?
MTKMTK

2009/11/25

51 seconds this time. Nice concept and quite addictive!
And I forgot to say that one side effect of this technique is that you can't drag the actors when the scenario is paused. The initial placement works normally, however.
I noticed that it was a common problem around here so I decided to play around with it because I thought that not letting actors out the visible part of the world was a serious limitation of Greenfoot. Maybe I can play around with scrolling sometime later!
MTKMTK

2009/11/25

I missed by 1 SECOND!!! :)