Skip to content

Pacman Game made using SFML and OOP Concepts in C++

Notifications You must be signed in to change notification settings

Rafay-Chohan/Pac-Man

Repository files navigation

Pac-Man

This code is of a C++ program that implements a simple game, Pac-Man using the SFML (Simple and Fast Multimedia Library) graphics library.

Summary:

  1. Several functions handle different aspects of the game, such as power-ups, collision detection, and starting the game.
  2. The main function initializes the game window and sets up game objects like the hero, enemies, maze blocks, and pellets.
  3. The game loop updates the positions and velocities of the hero and enemies, clears the screen, and draws objects.
  4. The game logic checks for pellet consumption, power-ups, collisions, and winning conditions.
  5. If a collision occurs without a power boost, the game ends and displays the player's score.
  6. If a collision occurs with a power boost, the collided enemy is eliminated.
  7. If all the pellets are consumed, the player wins the game and the score is displayed.

Note: The code includes file paths specific to the author's system, which might need to be modified to run the code correctly on a different system.

About

Pacman Game made using SFML and OOP Concepts in C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages