Want to create your own simple 3D world?
Put in an ASCII map, 2Dto3D will take care of the rest. 🤘
It can transform a plain txt map like this;
to be a Wolfenstein_3D-like world like this;
All of the features were implemented without any help from external libraries. ⭐
This project relies on MiniLibX and can be run only on MacOS.
Run the following command in your terminal. You should see the window similar to the above screenshot.
cd ~/Downloads && git clone https://github.com/kabelt/2Dto3D.git 2Dto3D && cd 2Dto3D && make && ./2Dto3D maps/map1.cub
KEY | Action |
---|---|
W |
move forward |
S |
move backward |
A |
move to the left |
D |
move to the right |
→ |
turn right |
← |
turn left |
M |
enable/disable minimap |
L |
enable/disable shadow effect |
ESC |
exit |
- Collision detection
- Sprites
- Different wall texturing based on directions
- Customizable wall/ceiling colors
- Shadow effect based on distance
- Minimap
You can find the details about how .cub files works here on page 6-9.
Then relaunch 2Dto3D with your map;
./2Dto3D <your_map>
This project is part of 42 pedagogy originally named as Cub3D.