Skip to content

abdallahelmadi/pacoman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‘พ pacoman

pacoman is a project where I create a simple 2D game using MiniLibX of 42network. The player moves inside a map, collects all collectibles, and then escapes through the exit.


๐Ÿ—บ๏ธ Map Requirements

The game map is defined in a anypath/anyname.ber file. It must respect the following rules:

  • Rectangular: All rows must have the same length.
  • Surrounded by walls: The map must be closed/surrounded by 1.
  • Allowed characters:
    • 1 โ†’ Wall
    • 0 โ†’ Free space
    • C โ†’ Collectible
    • E โ†’ Exit
    • P โ†’ Player starting position
  • Required elements:
    • At least 1 exit (E)
    • At least 1 collectible (C)
    • Exactly 1 player (P)
  • No invalid characters are allowed.

โœ… Valid Map Example

11111111111
1000000C001
1P1111111E1
10C0X000C01
11111111111

๐ŸŽฎ Controls

  • W / โ†‘ โ†’ Move up
  • S / โ†“ โ†’ Move down
  • A / โ† โ†’ Move left
  • D / โ†’ โ†’ Move right
  • ESC โ†’ Close the game

๐Ÿš€ How to Run

Fisrt you need to install dependencies by run this file:

./installdependencies

May take some seconds, sudo will ask you for sudopassword

Example to strat play:

./pacoman maps/0.ber

Choose the map you want, or create yours in /map folder or any other path.


Demo

About

2d game, you can make your maps and enjoy play

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published