2026-03-08 04:22:57 +01:00
2026-03-08 04:13:03 +01:00
2026-03-05 01:16:34 +11:00
2026-03-08 04:22:57 +01:00

glider-pixel

Génération d'images à la "jeu de la vie" écrit en C.

"Game of life" like image generation written in C.


Install

Fedora / RedHat :

# dnf install gcc
# dnf install SDL_image
# dnf install SDL_image-devel

Debian :

# apt install gcc
# apt install libsdl-image1.2
# apt install libsdl-image1.2-dev
# apt-get install libsdl1.2-compat   ( might be needed, or not )

Compile

Fedora / RedHat :

$ gcc `sdl-config --cflags --libs` glisseur_10.c -o glisseur_10

Debian :

$ gcc -o glisseur_10 glisseur_10.c `sdl-config --cflags --libs`

Run

$ ./sdl-glisseur_10

Kill

$ top  (or ps ax)  ---> get PID of the glider proccess
$ kill -9 PID

or try many times to close window


Adjust image size

Update WIDTH and HEIGHT on

// Canvas height and width //
#define WIDTH 640
#define HEIGHT 480

Set up the 4 colors

// 4 colors definition //
#define COLOR_0_R 254
#define COLOR_0_G 254
#define COLOR_0_B 254
#define COLOR_1_R 254
#define COLOR_1_G 0
#define COLOR_1_B 0
#define COLOR_2_R 0
#define COLOR_2_G 254
#define COLOR_2_B 0
#define COLOR_3_R 0
#define COLOR_3_G 0
#define COLOR_3_B 254

Change glider moving rules

Update the direction adding parameters, check examples in the

// ----- Glider moving rules ----- //
...
// END ----- Glider moving rules ----- //

section


Border bounce or pass through

Comment / uncomment bounce and pass through blocks

// BORDER BOUNCE //
...
// END - BORDER BOUNCE //

// BORDER PASS THROUGH //
...
// END - BORDER PASS THROUGH //

Let's glide !

glider-pixel

Description
Génération d'images à la "jeux de la vie" écrit en C. Game of life" like image generation written in C.
Readme WTFPL 126 KiB
Languages
C 100%