View Full Version : Snake game
01-06-2002, 09:15 AM
Hi Jesse and all
I'm about to make that snake game (this one whoch comes with the NOKIA mobile sets) and I have a problem with moving it with arrows. I just donno how to give it (the snake) this motion when I press the arrow to left or to right or...., sure I can't set it with the rotation, any idea pals .....????
01-06-2002, 09:44 AM
I made a copy od this game a whiel back just to see how hard it would be and was surprised (as it was easier than I'd expected). I approached it by creating a 2D array and using two variables to define the movement. If the user presses up, then the y variable states that the next move should be negative in the y axis, and the x variable is zero, as you can only move vertically or horizontally in the traditional game. Movement was achieve by simple set property and the array was updated according to which direction the user had pressed. that way they can just press (don't have to hold) the directional control, just like on the the phones.
01-06-2002, 10:09 AM
Thanks for that fast reply, but can u post the game here. I'm just starting my array studying here and trying ti figure it all out.
01-07-2002, 07:33 AM
Sorry but not all my source is open to the public. Some's comercial. :) Flashkit.com might have an example in the movies section.
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.