This branch contains the game version available at omelhorsite.pt.
Developed by Afonso Coutinho and Paulo Cordeiro.
Cub3D is a project inspired by the classic Wolfenstein 3D, developed as part of the 42 curriculum.
The project explores mathematical concepts of raycasting to simulate a three-dimensional environment on a 2D screen, handling textures, collisions, audio, controller integration (Xbox, PlayStation, etc.), simple AI algorithms for enemies, and more.
The project features two main maps:
- 🏫 42 Lisboa: A 3D version of the 42 Lisboa campus that you can explore.
- 🕹️ Wolfenstein 3D: A complete first-person shooter with enemies, weapons, collectibles, elevators, the first two floors from the original game, and a secret bonus floor.
The game also runs on the web using SDL and Emscripten, making it easy to play in the browser.
You can play it here: https://omelhorsite.pt/en/games/cub3d
To compile the native version of the game run:
makeTo run the game, you can provide a map as an argument or not and it will open hub.cub:
./cub3d [path/to/map.cub]To compile the web version (WASM), you need to have the Emscripten environment configured. Run:
make -f emcc.MakefileThis will generate the cub3d.html, cub3d.js, and cub3d.wasm files to run the game in the browser.

