/a-pacman-game-using-c

A PacMan Game developed in C language

Primary LanguageCMIT LicenseMIT

PacMan Game

C

A Pac-Man Game developed in C language

Screenshots

Pac-Man Game

screenshot_pacman_game

Debug Mode

screenshot_pacman_debug

screenshot_pacman_assert

☁️ Overview

This project was developed with the aim of obtaining a better understanding of some concepts in the C language, such as:

  • Basic Input and Output
  • Arrays and Strings
  • Dynamic Memory Allocation
  • Pointers
  • Asserts
  • Macros
  • Debug

🎮 Game Features

AI Ghosts and Pathfinding

One of the key features of this Pac-Man game is the implementation of a Breadth-First Search (BFS) algorithm in the artificial intelligence (AI) of the ghosts. The BFS algorithm enhances gameplay by allowing ghosts to intelligently navigate the maze and pursue the Pac-Man through the shortest possible path.

Resource Management

The game incorporates resource management techniques, including efficient memory allocation.

🚀 Installation

  1. Clone the repository:
$ git clone https://github.com/Guilhermebit/a-pacman-game-using-c.git
  1. Navigate to the project directory:
$ cd a-pacman-game-using-c\pacman
  1. Build the game:
  • For Windows

Download the MinGW: https://sourceforge.net/projects/mingw/

Run the following command:

mingw32-make all
  • For Linux

Run the commands:

sudo apt update

sudo apt install make

sudo apt install gcc

Run the following command:

make all
  1. Have Fun! 😎