Forum > Games
Simple Snake Game - Castle Game Engine
Eugene Loza:
This is an thoroughly-commented example of a very simple 2D game featuring:
* graphics with spritesheets,
* text output,
* keyboard/mouse input,
* read&write text files,
* sound & music,
* timer,
* Log,
* random
basically everything you might need to start making a simple 2D game in Castle Game Engine.
https://github.com/eugeneloza/SnakeGame
Bart:
--- Code: --- Rabbit := TRabbit.create(Application);
--- End code ---
Great idea to let the snake eat rabbits.
Is this portable to real-life?
Bart
lainz:
Good game!
Handoko:
@Eugene Loza
You're good in writing games. Have you consider to write tutorials in the wiki page? It will be very useful for others. I can't find game tutorials in Lazarus tutorial page.
Eugene Loza:
--- Quote from: Bart on November 07, 2016, 12:52:17 pm ---Great idea to let the snake eat rabbits.
Is this portable to real-life?
--- End quote ---
I wanted to add sound on gameover (when the snake bites itself): "That's a well-deserved punishment for eating innoncent rabbits!" But eventually I've considered it too long :)
@lainz, thanks :)
@Handoko, Just today I saw some tutorials for writing freepascal games in youtube :)
Basically, yes. I wanted to make some sort of "introduction/tutorial" to writing games in FreePascal/Lazarus and Castle Game Engine, starting from the very basics like "Hello World" and ending with some complex 3D scenes and logics :) But not much progress yet...
As for me, programming is mostly about games. I'm not a professional game designer, but I strongly believe it's a cool hobby to have :)
P.S. I've updated the code a little. And I will also make the game portable to Android in the nearest time.
Navigation
[0] Message Index
[#] Next page