How manuzxo/memory works
Project type and purpose
• This is a native, cross-platform Memory Game written in C. It uses Raylib (a simple C game library) and Raygui (an immediate-mode GUI extension).
• It compiles into a single executable that runs a graphical memory-matching game.
File structure
• Top-level files:
• CMakeLists.txt, build.sh, build.bat – build system and scripts
• README.md – project description & instructions
• Directories:
• /raylib, include/raylib/raygui.h – external headers bundled in-tree
• lib/(win, linux)/… – precompiled Raylib/Raygui libraries for each platform/architecture
• src/ – game source code, divided into:
– args.c/h: command-line argument parsing
– struct.h: core data structures (cards, board state)
– scene.c/h: game logic, state management
– render.c/h: drawing routines, GUI interaction
– main.c: program entry, main loop
README for additional insights
• Confirms Raylib and Raygui are the graphics layers.
• Explains build requirements (CMake or scripts) and supported platforms (Windows + Linux).
Elements
• From Build System → MemoryGame Executable (link)
• From MemoryGame Executable → Raylib/Raygui (API calls)
• From OS/Graphics Driver → Raylib/Raygui → Render Module (input events)
• Build-time artifacts (CMake, lib/) in gray
• Runtime modules (scene, render, args, Raylib) in blue
• External systems (OS/driver) in green
Detailing & capturing essentials
• Don’t split modules thinner than their C files; group related functions under their module name.
• Both compile-time (build scripts, libraries) and run-time flow (game loop, rendering, input).
• Use annotations or legends to note platform-specific library folders (win vs. linux).