PDA

View Full Version : Little ASCII 1 & 2 player snake game



burntcustard
02-05-2012, 04:34 PM
I started this as "revision" for an A level exam I've got in a month and it's become more of a fun little project rather than revision. I started it in turbo-pascal, then switched to an old Free Pascal version (early 2009), and then recently upgraded to using the lates FPC 2.6 and notepad++ rather than the standard IDE. The game has a singleplayer mode with high scores list, two player on one computer (without high scores), and options for customizing the snakes.

I saw a bunch of people had said it was impossible to use notepad++ to effectively write and compile in, but with the NppExec script below It's been working wonderfully.

cd $(CURRENT_DIRECTORY)
NPP_SAVE $(FILE_NAME)
fpc $(NAME_PART).pas
NPP_RUN $(NAME_PART).EXE

Because of all the switching and my relative inexperience in programming, and the fact that I've been completely making it up as I go along, the code is a bit (very) messy, but it would be nice if people had a look at it and helped me with anything I'm doing drastically wrong or that could be done in a much simpler way :) I'd also be interested in hearing some high scores for those who try out the game!

Screenshot:
851

Download: Game (http://dl.dropbox.com/u/28565393/Snake%20Game/snake.exe) - Source Code (http://dl.dropbox.com/u/28565393/Snake%20Game/Snake%20source%20code.txt)

paul_nicholls
02-05-2012, 10:23 PM
Nice work mate :)
I will take a look ASAP...