Skip to content

enekomb/so_long

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

so_long — 2D Game in C

42 Urduliz — Common Core project

A 2D top-down game built with MiniLibX. Collect all items, avoid enemies, and reach the exit.


Features

  • 2D tile-based rendering with XPM sprites
  • Player movement: W A S D
  • Collectibles, enemies with basic AI, and exit tile
  • Move counter displayed in terminal
  • Full map validation (rectangular, walled, reachable path)
  • Custom .ber map format

Build & Run

make
./so_long maps/map.ber

Map Format

1111111111
1000010001
1011101C01
100000E001
1C00100001
1111111111

1 = wall · 0 = empty · C = collectible · E = exit · P = player · M = enemy

Project Structure

so_long/
├── so_long.c       # Entry point
├── so_long.h       # Shared header
├── game/           # Game loop, movement, rendering
├── enemy/          # Enemy movement logic
├── errors/         # Map validation
├── utils/          # libft utilities
├── imgs/           # XPM sprites
├── maps/           # Test maps
└── mlx_linux/      # MiniLibX graphics library

Skills

C 2D Graphics Game Development MiniLibX Map Parsing Memory Management


Academic Integrity

This repository is shared for educational and portfolio purposes only.

For 42 students:

  • Do not copy this code for your own project submissions
  • Use it as a reference to understand concepts and approaches
  • Write your own original solution — that is the only way to actually learn

42's core values are learning through practice, peer collaboration, and genuine problem-solving.


License

MIT — see LICENSE for details. Copyright (c) 2026 Eneko Muñoz Bordona

About

2D tile-based game — 42 Urduliz

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors