# 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 to CTRL+C many times - - - - - - - # Adjust image size Update WIDTH and HEIGHT on lines 36 and 37 ``` #define WIDTH 640 #define HEIGHT 480 ``` - - - - - - - # Change glider moving rules Update the direction adding parameters, check examples from line 158 to line 205 - - - - - - - # Border bounce or pass through Comment / uncomment bounce and pass through blocks on line 288 to 351 - - - - - - - # Let's glide ! ![glider-pixel](/glider_pixel.png)