Skip to content
/ 2Dto3D Public

Generate 3D world from 2D map using raycasting.

Notifications You must be signed in to change notification settings

kabelt/2Dto3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2Dto3D 🌌

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. ⭐

Requirements

This project relies on MiniLibX and can be run only on MacOS.

Installations

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

Controls

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

Features

  • Collision detection
  • Sprites
  • Different wall texturing based on directions
  • Customizable wall/ceiling colors
  • Shadow effect based on distance
  • Minimap

It's time to create you own world!

You can find the details about how .cub files works here on page 6-9.
Then relaunch 2Dto3D with your map;

./2Dto3D <your_map>

Acknowledgements

This project is part of 42 pedagogy originally named as Cub3D.

About

Generate 3D world from 2D map using raycasting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published