Skip to content

Repository files navigation

cub3d

A Wolfenstein-style raycasting game built in modern C++ (C++20) on top of MLX42. Builds and runs both natively (Linux/macOS) and in the browser via Emscripten/WebAssembly, from the same source tree and Makefile.

Building

make        # native release build
make debug  # ASan/UBSan debug build
make web    # Emscripten build (runs emcc in a pinned container)
make test   # Catch2 unit tests
make lint   # clang-tidy
make docs   # Doxygen HTML + XML

Layout

  • engine/ : RAII/OOP C++ wrapper around the raw MLX42 C API.
  • gui/ : small immediate-mode GUI library built on engine/.
  • game/ : the cub3d game itself:
    • core/ : GameState + StateMachine.
    • map/ : .cub parsing and the parsed Map.
    • raycast/ : DDA raycasting and the camera.
    • entities/ : player, enemies, movement, interaction.
    • render/ : world, sprite, radar, and texture-atlas passes.
    • states/ : level select and play.
  • main.cpp : composition root.

About

UltimateCub3d

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages