Snake game for the ptcGraph unit
  • Pascal 99.5%
  • C++ 0.2%
  • Shell 0.2%
Find a file
Roland Chastain 02494486a4 Delete scripts
2025-08-07 07:00:08 +02:00
factory Delete scripts 2025-08-07 07:00:08 +02:00
resources Replace rabbit picture 2021-04-25 20:27:23 +02:00
screenshots Replace rabbit picture 2021-04-25 20:27:23 +02:00
units Upload all files 2021-04-25 17:25:51 +02:00
.gitignore Update .gitignore 2021-04-27 18:16:55 +02:00
bass.dll Upload bass.dll 2021-04-28 12:47:40 +02:00
bass.pas Update .gitignore 2021-04-27 18:16:55 +02:00
build.sh Update build.sh 2021-05-01 07:10:34 +02:00
colors.pas Upload all files 2021-04-25 17:25:51 +02:00
english.inc Modify build.sh 2021-04-25 20:38:58 +02:00
extrafpc.cfg Update build.sh 2021-05-01 07:10:34 +02:00
french.inc English language file 2021-04-25 20:32:08 +02:00
graphics.pas Allow the snake to go through walls 2021-04-27 17:29:30 +02:00
highscores.pas Upload all files 2021-04-25 17:25:51 +02:00
image.pas Upload all files 2021-04-25 17:25:51 +02:00
keys.inc Upload all files 2021-04-25 17:25:51 +02:00
language.inc English language file 2021-04-25 20:32:08 +02:00
libbass.so Update .gitignore 2021-04-27 18:16:55 +02:00
README.md Update README 2021-04-29 10:32:11 +02:00
size.pas Upload all files 2021-04-25 17:25:51 +02:00
snake.ico Create icon 2021-04-29 10:28:15 +02:00
snake.lpi Create icon 2021-04-29 10:28:15 +02:00
snake.pas Create Lazarus project 2021-04-29 09:57:16 +02:00
snake.res Create icon 2021-04-29 10:28:15 +02:00
snakegame.pas Change initial snake length 2021-05-01 07:38:26 +02:00
snakepictures.pas Replace rabbit picture 2021-04-25 20:27:23 +02:00
snakevideogame.pas Change initial snake length 2021-05-01 07:38:26 +02:00
sound.pas Fix Windows compilation error 2021-04-29 09:37:52 +02:00
utils.pas Upload all files 2021-04-25 17:25:51 +02:00

Snake

Snake game for the ptcGraph unit.

Screenshot

screenshot

Usage

Use the keyboard arrows to steer the snake.

Compilation

Library

To compile and to use the program, you need the BASS library.

The file libbass.so (or bass.dll on Windows) must be in the program directory.

The files libbass.so and bass.dll included in this repository are for a 64-bit OS. (In case your need a 32-bit binary, you can find it or on the official BASS website, or on this page).

If you are in a hurry, compile with -dNoSound.

Compilation options

To get real graphics (and not simple colored squares) you have to compile the program with -dPictures.

If your FPC version is recent enough, you can use -dUserMode, to get a custom sized window. Otherwise the program will create a 640x480 window.

See build.sh for a command line example.

Credits

Graphics

Graphics for a snake game by Eugene Loza.

Cherries image by Master484.

Sounds

The Essential Retro Video Game Sound Effects Collection by Juhani Junkala.

BASS library.

Ideas

I took ideas (and even some source code) in the simple snake game by Markus Mangold.