Project archive

so-long

42 Lisboa · Graphics and validation

Before the game starts, the map must pass several checks: valid dimensions, closed walls, required elements, and a path from the player to every collectible and the exit.

Flagship case study2025

Reachability copy5 × 7 grid

flood fill · prove the path

Year
2025
Language
C
Context
42 Lisboa
Stack
C · MiniLibX · 2D Graphics · Flood fill

What I owned.

01 · Personal contribution

I implemented the game loop, map parsing and validation, rendering, movement, collectible state, and cleanup for the C graphics stack.

How it works.

02 · Architecture

  1. 01

    Parse

    Read the map into a stable grid and reject malformed rows, invalid characters, or missing required elements.

  2. 02

    Prove

    Run flood fill on a copy of the grid to confirm the player can reach every collectible and the exit without mutating the playable map.

  3. 03

    Render

    Translate tile state into MiniLibX frames while keeping movement counts, collection state, and exit behavior synchronized.

The problem I had to solve.

03 · Hardest problem

Flood fill was the hardest idea to understand. It clicked when I treated the copied map as a test surface: visit every reachable tile, then check whether every collectible and the exit were reached.

The result.

04 · Result

The project received 100/125 in evaluation. The mandatory game and validation work were completed; the optional bonus was not attempted.

What I learned.

05 · Reflection

If I returned to the project, I would build beyond the mandatory brief with clearer feedback, more progression, and original artwork.

Project notes.

Margin notes

  • 01

    Evaluation: 100/125

  • 02

    Mandatory scope completed; bonus not included

  • 03

    Freely reusable visual assets were sourced online

Read the repository or ask me about the project.

View repositoryDiscuss this work