Skip to content

bepoisso/42-So_long

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

135 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

So Long - A 2D Escape Game

So Long is a project where you will develop a 2D game using the MiniLibX, with textures, sprites, and basic gameplay mechanics. This project introduces you to graphical programming and event handling in C.

Status

Exemples

How to run my so_long ?

Just clone the repo

Make inside the repo

to execute : ./so_long your_42_login map_you_would_use.ber

(the 42login is used for add your score in scoreboard) You can send me your score and i'm gonna add it inside the scorboard file (With the default map).

Objectives

The main goal is to program a game where the player must collect all items on the map and escape through the exit while adhering to the following constraints:

  • Use MiniLibX for graphical rendering.
  • Write the program in C, following strict coding standards (Norm).
  • Properly manage memory (no memory leaks).
  • Validate and parse maps in the .ber format.

Useful Resources

  • MiniLibX Doc
  • So_Long Tester
  • Key Features

    Program Name so_long
    Submission Files Makefile, *.h, *.c, maps, textures
    Arguments A map in the *.ber format
    Allowed External Functions open, close, read, write, malloc, free, perror, strerror, exit, MiniLibX functions
    Libft Allowed Yes
    Description A game where the player collects items and escapes a labyrinth.

    Rules

    1. The map must:
      • Be rectangular and surrounded by walls.
      • Contain at least one exit, one collectible item, and one starting position.
      • Follow a valid structure (0, 1, C, E, P).
    2. The W, A, S, D keys are used to move the player.
    3. Each movement is counted and displayed in the terminal.
    4. The window must close properly via ESC or clicking the window close button.

    Bonus Features

    • Add patrolling enemies that can defeat the player.
    • Display the move count directly on the game window.
    • Animate sprites to enhance aesthetics.

    Example Map

    Compilation and Execution

    Compile the program with the provided Makefile: make ./so_long maps/example.ber The program should display a window containing the map and allow user interaction.

    Good luck and enjoy working on this project!


    Feel free to add a issue if you find it and i will fix it. (Leak, Error, Missing feature, etc...)

    Disclamer

    • 🇬🇧 This project has an educational purpose and you should under no circumstances copy and paste. Cheat is bad. Dont cheat

    • 🇫🇷 Ce projet a un but educatif et vous ne devez en auccun cas faire du copier coller. Tricher c'est mal. Ne trichez pas


    ©42Perpignan(bepoisso)

    About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

     
     
     

    Contributors