first game!

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
gigglesnap
Posts: 1
Joined: July 5th, 2012, 3:28 am

first game!

Post by gigglesnap » July 10th, 2012, 12:46 am

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
Attachments
Snake.zip
(5.86 MiB) Downloaded 399 times

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: first game!

Post by LuX » July 10th, 2012, 10:46 am

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.
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: first game!

Post by chili » July 10th, 2012, 12:34 pm

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.
Chili

Post Reply