Page 1 of 1

Classic Snake Movement

PostPosted: Mon Sep 23, 2013 2:35 am
by jaskokoyn
Hey everybody, I was wondering what approach I should take for a classic snake movement in construct 2. Here's what I have so far.



It works, but it's only a little off. For some reason, I feel like there's a better solution out there. So, can anyone provide what I should be doing instead or recommend anything I can do to improve my solution?

Keep in mind, I'm not looking for smooth movement. I would like to stick to the classic's version of the snake movement.

Please and thank you :)!

Re: Classic Snake Movement

PostPosted: Mon Sep 23, 2013 3:39 am
by shoxsz
I'm new in C2, but i guess you can jump the part of test with the direction variable, when you take a click and them you set the variable to be analized in the next loop, maybe when you receive the keyboard input you can just turn the snake to the right direction, i hope it can help and no give you a better smooth movement.
:)

sorry for bad english

Re: Classic Snake Movement

PostPosted: Mon Sep 23, 2013 6:26 pm
by ChrisAlgoo
Well, what feels off about it? What don't you like?

Re: Classic Snake Movement

PostPosted: Tue Sep 24, 2013 7:19 pm
by jaskokoyn
[QUOTE=ChrisAlgoo] Well, what feels off about it? What don't you like?[/QUOTE]

When I pressed a key the snake would move a little late and not on the mark. I got it fixed though.

However, I have a new problem now. When the snake eats the apple, then how do I create the body and then have it follow the snake?

Re: Classic Snake Movement

PostPosted: Thu Nov 21, 2013 4:49 pm
by QuaCro
I dont know if it is late for me to respond, but here is my solution.
on head you put bullet behavior and if you want wrap behavior.
Insert keyboard.

Now on event sheet on up arrow > head rotate 270 degrees toward 270... and so on :D ( i cant upload img yet)

It is simple and it works

Put global variable for speed so you can change it as the game is geting harder.