Simple game made in the SDL2 library. The game is completely made in C.
The game requires the SDL2, SDL2_image, SDL2_ttf and SDL2_mixer library.
cd Pacman
make
./pacman
- if you want to change the map edit the file map1.txt
- resolution of the map is 34x21 chars
- P - spawnpoint of Pacman
- W - wall sign
- C - cherry sign (special buff lasting 15 seconds allowing you to eat ghosts)
- '-' point sign
- 1 - Blinky spawnpoint
- 2 - Inky spawnpoint
- 3 - Pinky spawnpoint
- 4 - Clyde spawnpoint
- Pacman is controlled with the arrow keys
- pressing an arrow key changes the direction of Pacman
- Pacman can't walk through walls or doors and into the center cell, where the ghost spawnpoints are located (see original map)
- points are worth 10 points
- cherries are worth 200 points and it also provides a buff to eat ghosts lasting 15 seconds
- catching a ghost is worth 500 points
- the player has 3 lives in the beginning
- if the ghosts catch Pacman, then the player takes 1 life and the positions of Pacman and the ghosts are reset
- if the player runs out of lives the game ends and the Game Over screen appears
- if the player collects all the points on the map the game ends and the Winning screen appears
- pressing the R key restarts the game
- pressing the Q key quits the game
- pressing the G key forces Game Over
- pressing the H key forces the Win
Jednoduchá hra udělaná v knihovně SDL2. Hra je kompletně udělaná v jazyce C
Hra vyžaduje knihovnu SDL2, SDL2_image, SDL2_ttf a SDL2_mixer.
Pokud chcete spustit hru na operačním systému Windows, musíte si knihovny SDL2 doinstalovat, na Linuxu/Macu jsou knihovny propojeny automaticky
cd Pacman
make
./pacman
- pro změnu mapy upravte soubor map1.txt
- rozměry mapy jsou 34x21 charakterů
- P - spawnpoint Pacmana
- W - značka zdi
- C - značka třešně (speciální buff trvající 15 vteřin umožňující sníst duchy)
- '-' Značka bodu
- 1 - spawnpoint ducha Blinky
- 2 - spawnpoint ducha Inky
- 3 - spawnpoint ducha Pinky
- 4 - spawnpoint ducha Clyde
- Pacman se ovládá pomocí šipek
- stisknutí šipky změní směr Pacmana
- Pacman nemůže procházet zdmi ani dveřmi a do středové buňky, kde se nachází spawnpointy duchů (viz. originální mapa)
- sebrání bodu je za 10 bodů
- sebrání třešně je za 200 bodů a zároveň poskytuje buff umožňující sníst duchy trvající 15 vteřin
- chycení ducha je za 500 bodů
- hráč má ze začátku 3 životy
- pokud duchové chytí Pacmana, když není powered tak se hráči ubere 1 život a pozice Pacmana a duchů se vyresetují
- pokud hráči dojdou životy hra končí a ukáže se Game Over screen
- pokud hráč posbírá všechny body na mapě hra končí a ukáže se Winning screen
- klávesou R se hra restartuje
- klávesou Q se hra ukončí
- klávesou G vynutíte prohru
- klávesou H vynutíte výhru