Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

snake-ptcgraph

Snake game for the ptcGraph unit

View on Codeberg

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

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.