GithubHelp home page GithubHelp logo

pacman-pygame's Introduction

Pac-Man

Introduction

Project Backgrounds

This project aims to practice building a Pac-Man style game using 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 will be generated based on the map data from the resource files.

Demo Video Available

Main Tech-Stacks for the Project

  • Python

Installation

Required Packages

Following packages are required to install the game. Please prepare following packages installed on your machine before the installation. Most recent version is recommended. Tkinter and Pygame can be installed using pip.

  • Python 3
  • Tkinter
  • Pygame

Installation

As the product is not using any game framework or engine, the installation process is simple copy and paste.

  1. Create a directory for the game.
  2. Copy the product into the new directory.

Map Generator

The map generator will read a map file in /resource directory. 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.

Symbol Legends

  • _ passage (empty)
  • # wall
  • $ ghost spawn point
  • . pellet
  • @ Pac-Man (starting point)
  • & free ghost
  • % caged ghost

Example

############################
#............##............#
#.####.#####.##.#####.####.#
#.####.#####.##.#####.####.#
#.####.#####.##.#####.####.#
#..........................#
#.####.##.########.##.####.#
#.####.##.########.##.####.#
#......##....##....##......#
######.#####_##_#####.######
######.#####_##_#####.######
######.##____&_____##.######
######.##_###_####_##.######
######.##_###_####_##.######
______.___###$####___.______
######.##_###%####_##.######
######.##_########_##.######
######.##__________##.######
######.##_########_##.######
######.##_########_##.######
#............##............#
#.####.#####.##.#####.####.#
#.####.#####.##.#####.####.#
#...##.......@........##...#
###.##.##.########.##.##.###
###.##.##.########.##.##.###
#......##....##....##......#
#.##########.##.##########.#
#.##########.##.##########.#
#..........................#
############################
############################

pacman-pygame's People

Contributors

lylant avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.