Skip to content

vfiszbin/so_long

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

so_long

For this 42 project, we code a simple 2D game using the minilibX graphics library for rendering and event handling.

Screenshot of the game

How to run it

First you have to compile the project, you can do so with :

make

Then, you can run the program like so :

./so_long <map_path>

The program takes a map_path as an argument, a sample map is provided in the maps folder. You can test it by running this command :

./so_long maps/map.ber

How to play

You are a cunning fox and you have to eat all the chickens on the map before escaping through the hole. Each time you move a steps counter is incremented, the goal is to complete the game with the smallest number of steps.

To move you can press the W,A,S,D keys. The game can be exited by pressing the Esc key.

Features

  • You can't pass through the walls !
  • The program can parse any map, so you can create a map from sracth and the game will run it
  • The map parsing ensures that the map is valid (rectangular, enclosed by walls, containing at least an exit, a player position and an item)
  • As always, the program should be free of memory leaks

Credits

About

2D minigame

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published