66 lines
1.1 KiB
Markdown
66 lines
1.1 KiB
Markdown
# glider-pixel
|
|
|
|
Génération d'images à la "jeu de la vie" écrit en C.
|
|
|
|
"Game of life" like image generation written in C.
|
|
|
|
- - - - - - - -
|
|
# Installation
|
|
|
|
## Fedora / RedHat :
|
|
```
|
|
# dnf install gcc
|
|
# dnf install SDL_image
|
|
# dnf install SDL_image-devel
|
|
```
|
|
|
|
## Debian :
|
|
```
|
|
# apt install gcc
|
|
# apt install libsdl-image1.2
|
|
# dnf install libsdl-image1.2-dev
|
|
# apt-get install libsdl1.2-compat ( might be needed, or not )
|
|
```
|
|
|
|
- - - - - - -
|
|
# Compiling
|
|
|
|
## 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`
|
|
```
|
|
|
|
- - - - - - -
|
|
# Running
|
|
```
|
|
$ ./sdl-glisseur_10
|
|
```
|
|
|
|
- - - - - - -
|
|
# Killing
|
|
```
|
|
$ top (or ps ax) ---> get PID of the glider proccess
|
|
$ kill -9 PID
|
|
```
|
|
- - - - - - -
|
|
# Adjusting image size
|
|
Update i and j on lines 122 and 123
|
|
```
|
|
i=320;
|
|
j=240;
|
|
```
|
|
|
|
- - - - - - -
|
|
# Changing glider moving rules
|
|
Update the direction adding parameters, check examples from line 158 to line 205
|
|
|
|
- - - - - - -
|
|
# Let's glide !
|
|
|
|

|