Skip to content

This repository contains a simple implementation of the classic Pac-Man game using C and OpenGL. The game includes features such as Pac-Man movement, pellet collection, ghost behavior, scoring, and lives management.

Notifications You must be signed in to change notification settings

AbdulRehman1780/Multi-threaded-Pac-Man

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-threaded-Pac-Man

This is a simple implementation of the classic Pac-Man game using OpenGL and GLUT in C.

Description

The project consists of multiple C files:

  • gameEngine.c: Contains the main game logic, including initialization, game loop, display rendering, and keyboard input handling.
  • ghost.h: Header file defining the Ghost structure and functions related to ghost behavior.
  • ghostController.c: Source file containing the implementation of functions related to ghost behavior.
  • userInterface.c: Source file containing functions related to game initialization, board rendering, pellet management, and collision detection.

Installation

  1. Ensure you have OpenGL and GLUT installed on your system.
  2. Compile the project using a C compiler such as GCC.
gcc gameEngine.c -o pacman -lGL -lglut -lm -lpthread
  1. Run the compiled executable.
./pacman

Usage

  • Use the arrow keys to control Pac-Man's movement.
  • Collect pellets to increase your score.
  • Avoid colliding with ghosts, which will decrease your lives and score.

Contributors

  • [Abdul Rehman]
  • [Ramish Shakeel]

License

This project is licensed under the MIT License.

About

This repository contains a simple implementation of the classic Pac-Man game using C and OpenGL. The game includes features such as Pac-Man movement, pellet collection, ghost behavior, scoring, and lives management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages