A Wolfenstein3D-like raycaster made in Windows Batch.
Table of Contents
This is an old-school DDA raycaster made in Windows Batch. This project is notable for its functionality despite Batch's lack of floating point arithmetic or built-in trigonometric functions.
Per Batch's limitations, frames take roughly 1.5 seconds to generate and movement is done via console-inputs (set /p
).
Read an in-depth analysis of this project here.
Designed for Windows 10 Command Prompt (conhost or Terminal), non-legacy mode, Consolas. Functionality within Linux/macOS virtual environments may vary (e.g. wine). See troubleshooting if you experience any issues.
- Clone/download the repo
git clone https://github.com/nTh0rn/batch-raycaster.git
- Modify
map.txt
to contain the map of your choice. Use.
to denote empty space,@
to denote the player's position, and use any other character to denote walls except for'
or#
, which are reserved for internal use. - Execute
raycaster.bat
(orraycaster-optimized.bat
for better performance at the cost of unreadable code). - Movement/aiming commands are relative to the top-down map. See CONTROLS.txt.
3.1w
=north,a
=west,s
=south,d
=east
3.2z #
=aim left,x #
=aim right, where#
is the number of degrees to turn.
-
Some machines may encounter issues printing Unicode characters. If you're already using non-legacy Command Prompt (conhost or Terminal) with Consolas font and still experiencing issues, then try out the versions within /no-unicode/.
-
Set
debug_show_wall_type=true
to show the walls' char from map.txt both within the FOV and within the mini-map for debugging purposes.
Distributed under the MIT License. See LICENSE.txt
for more information.
Nikolas Thornton - nthorn.com - [email protected]