How saidyanak/so_long works
Project type and purpose
• This is a small 2D “so_long” maze‐style game written in C, using MiniLibX for graphics and a custom libft for utility functions.
• Its purpose is to load a map from a “.ber” file, validate it, render it in a window, handle user input, update game state, and exit when the player collects items and reaches the exit.
File structure
Top‐level C modules:
• so_long.c – program entry point, initializes everything, enters game loop
• init_map.c / read_map.c / map_checker.c / map_reachable.c – load, parse, and validate the map
• render_map.c – translate the in‐memory map into on‐screen pixels
• accessibility_controls.c – user input handler (keyboard controls)
• close_window.c – window/event teardown
• get_next_line.c – line‐by‐line file reader
Assets:
• images/*.xpm – tile assets (walls, player, collectibles, exit, background)
• maps/*.ber – sample maps
Third‐party libraries:
• libs/libft – standard C helpers (strings, memory, I/O)
• libs/minilibx-linux – graphical/context hooks to X11
Build & config:
• Makefile
• .vscode (editor settings)
Missing README
– No architecture sketch exists, so we’ll infer from code organization.