Snake! [GAME]

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
SunShine
Posts: 31
Joined: February 16th, 2013, 2:44 pm

Snake! [GAME]

Post by SunShine » March 27th, 2013, 9:10 am

Hi Chili people!

So i hooked up this game quite a while ago, right after learning about classes in chillis tutorials. The game is really simple, no fancy graphics or so, but its still a snake :D


Anyways if you want, try it out.
Use mouse in the menu & arrow keys when playing.
Attachments
Snake.rar
Snake game
(838.86 KiB) Downloaded 398 times

User avatar
viruskiller
Posts: 399
Joined: June 14th, 2012, 5:07 pm

Re: Snake! [GAME]

Post by viruskiller » March 27th, 2013, 2:55 pm

really nice worked out:D.
one question tough , how long did it took u to figure how to do the snake movement so is done right when u press the key and how to add the next cube at the end of the snake instead of the head:D?

i made a similar snake game, although no text graphics on it , a while ago and at first it looked really simple the way i designed it, but then it felt like it wasn't like the real thing, meaning my snake was slowing down for a bit every time it hit the goal, and also it was turning one snake movement after the key being pressed instead of the next game frame:)

anyways have't noticed any of that with your game is is cool:), although the speeds are kinda medium to very hard instead of easy ,normal,hard for me:D. some snake games have a real snail like speed for easy mode:)

User avatar
SunShine
Posts: 31
Joined: February 16th, 2013, 2:44 pm

Re: Snake! [GAME]

Post by SunShine » March 27th, 2013, 3:34 pm

Hi viruskiller.

In short, the snake is made out of boxes, every box is an object, all boxes are linked together.
I used linked-list method to do all the stuff, for example to add a new box I just create a new box object and attach it to the end of the linked-list. For the movements - I loop backwards from the last box to the first one, and change their positions. Like so - Box->xPositon = Box->previousBox->xPosition .

It took me some time to figure out all the stuff, but in the end i was happy of my game :D

Post Reply