Page 1 of 1

first game!

Posted: July 10th, 2012, 12:46 am
by gigglesnap
Hi everyone

I've been watching Chilli's videos (up to the pointers so far) and decided to make my own game.

It's just a simple snake clone but you can change the size of the grid and sqares in game.h.

Don't mash the buttons fast or it bugs out and makes you move back into yourself... Too tired to think of a fix right now.

leme know what you think :D

Re: first game!

Posted: July 10th, 2012, 10:46 am
by LuX
Each time someone uploads a project without cleaning it first, a kitten dies : -( You could have converted the file to less than 160 kb.

The game looks cool. The code looks pretty straight forward and you have commented it pretty well. Not much to add there.

For the quick button press glitch, you could make a boolean that checks if a button has been pressed, and only turn pressable once the snake makes a step and the key has been lifted. This would mean you can only take on turn per snake movement. Right now you can make multiple turns in one step, meaning that you can turn 180* in one step.

Re: first game!

Posted: July 10th, 2012, 12:34 pm
by chili
Nice first game gigglesnap, welcome to the board. ;)

I like how you neatly separated the drawing code from the game logic. Good organization and style there.