This repo involves producing a Pac-Man style game in Python.
- The Essencial: to make Pac-Man eat all available pellets, while avoiding collisions with ghosts chasing him.
- Ghosts: Ghosts always start at their home base. All ghosts move toward random direction.
- Game Levels: All levels are generated based on the map data from the resource files.
- Python
- Tkinter
- Pygame
- Clone the repo with Git
- Check you installed Python
- Check you installed Pygame
- Execute main.py with Python
The map generator will read a map file in /resource folder. The file name should be level#.txt or level##.txt, ## refers to the number of the level. The file contains 32×32 characters, each character indicates a block/item in the game field.
_passage (empty)#wall$ghost spawn point.pellet@Pac-Man (starting point)&free ghost%caged ghost
############################
#............##............#
#.####.#####.##.#####.####.#
#.####.#####.##.#####.####.#
#.####.#####.##.#####.####.#
#..........................#
#.####.##.########.##.####.#
#.####.##.########.##.####.#
#......##....##....##......#
######.#####_##_#####.######
######.#####_##_#####.######
######.##____&_____##.######
######.##_###_####_##.######
######.##_###_####_##.######
______.___###$####___.______
######.##_###%####_##.######
######.##_########_##.######
######.##__________##.######
######.##_########_##.######
######.##_########_##.######
#............##............#
#.####.#####.##.#####.####.#
#.####.#####.##.#####.####.#
#...##.......@........##...#
###.##.##.########.##.##.###
###.##.##.########.##.##.###
#......##....##....##......#
#.##########.##.##########.#
#.##########.##.##########.#
#..........................#
############################
############################