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

Comments for Snake

Return to Snake

FirewallFirewall

2012/5/3

Good job. The grafics are bad o_O. When you want, I can make you some new pics (for example apples or so)
A new version of this scenario was uploaded on Thu May 03 14:21:26 UTC 2012 *Changes to collision system
chiefnoahchiefnoah

2012/5/3

This was just made as a school project, the graphics are supposed to look terrible. If you want, you can send me pics to implement into the game but after i'm done with the project it will no longer get updates
A new version of this scenario was uploaded on Fri May 04 01:32:05 UTC 2012 *Progressive difficulty: every time you eat a piece of food, the snake moves faster. *Bug fixes
SwedishsamSwedishsam

2012/5/4

I'm doing a similar game as a school project, but i am in need of code to make the food spawn randomly on the map over and over again as i eat it. As of now i can only get the food to spawn over and over again in the same place.
chiefnoahchiefnoah

2012/5/4

Here's an example from my code: public void placeFood(int amountOfFood) { for (int i = 0; i < amountOfFood; i++) { addObject(new Food(), Greenfoot.getRandomNumber(59)+1, Greenfoot.getRandomNumber(39)+1); } }
chiefnoahchiefnoah

2012/5/4

Here's an example from my code: public void placeFood(int amountOfFood) { for (int i = 0; i < amountOfFood; i++) { addObject(new Food(), Greenfoot.getRandomNumber(59)+1, Greenfoot.getRandomNumber(39)+1); } }
A new version of this scenario was uploaded on Fri May 04 14:01:07 UTC 2012 *Published source code
jabirfatah91jabirfatah91

2012/11/18

Hi does your snake consist of two body segments from the game starting?
chiefnoahchiefnoah

2012/11/19

Each body segment (the size of the head) is an individual object. I created an array of those objects, and when the snake moves, an object gets the location of the body part that was 1 place before it in the array.
Denver005Denver005

2016/8/12

can i please have all of your codes :( i need help for my game project :(
hmphrydmphyhmphrydmphy

2016/8/12

HAHAHA :D BOSS DENVER
newbie installation problem: I am running the latest Greenfoot 3.5.1 but it fails to open the snake game: the world could not be constructed. The world subclass may not have a public constructor without parameters, or may not be public.