There are a number of solutions (I can, at the moment, say there are a minimum of 6; but, there are probably more like a dozen or so); and I am not counting rotations/mirrors/etc.
@Pointifix, my Pong Pinball scenario, at http://www.greenfoot.org/scenarios/7455, has collision detection between circles and rectangles you might be interested in looking at.
@Pointifix, the demo was more for the movement of the snake, not for the collision detection; so, I do not think I will worry about it. Unless, you have a need for better and need some help?
@Pointifix, in world 3, the snake segments are rotated which, for one, widens the width and height of the images. Also, the snake is moved 5 pixels at a time and it stops if it cannot move the whole five pixels. Together, I believe it covers the 15 pixels you mentioned.
@lordhershey, at faster scenario speeds, the graphics do not keep up this the act cycles. I mean, the screen is not refreshed each and every cycle. So an fps counter would not be accurate as far as the display was concerned. I could just re-upload to unlock the scenario and allow the user to adjust the speed slider on it.
2014/3/7
12-pce Rectangular Puzzle
2014/3/7
12-pce Rectangular Puzzle
2014/3/7
12-pce Rectangular Puzzle
2014/3/7
Logo
2014/3/6
Logo
2014/3/5
Snake Tracks Demo
2014/3/5
Snake Tracks Demo
2014/3/5
Snake Tracks Demo
2014/3/5
Not For Epileptics