Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

so_long

Language School Norminette

A small 2D tile-based game built in C using the MiniLibX graphics library.

Description

so_long is a simple 2D game where the player must collect all collectibles on the map and reach the exit. The map is loaded from a .ber file and rendered tile by tile using MiniLibX. The project introduces graphical programming concepts in C without using any game engine.

Gameplay

  • Move the player with W, A, S, D or arrow keys
  • Collect all items (C) before reaching the exit (E)
  • The map is validated at startup (valid path, surrounded by walls, at least one player, one exit, one collectible)
  • Move count is displayed in the terminal

Map Format (.ber)

1111111111
1000000001
1C0001E001
1000P00001
1111111111
Symbol Meaning
1 Wall
0 Empty space
P Player start
C Collectible
E Exit

Stack

  • Language: C
  • Library: MiniLibX (X11 / macOS)
  • Key concepts: event loop, sprite rendering, 2D map parsing, flood-fill validation

Architecture

main → parse .ber file → validate map (flood-fill)
     → init MiniLibX window
     → render all tiles from map array
     → hook keyboard events → update player position → re-render

42 Project Info

Field Value
Project so_long
Circle 2
Norminette Compliant

What I Learned

  • Graphical programming with MiniLibX (window, image, events)
  • 2D map parsing and validation with flood-fill
  • Game loop design: event handling → state update → render

About

42 School project — 2D tile-based game using the MiniLibX graphics library

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages