Show HN: A Wolfenstein3D-like raycaster made in Windows Batch

5 days ago 1

A Wolfenstein3D-like raycaster made in Windows Batch.

*not real-time frame generation
Table of Contents
  1. About
  2. Getting started
  3. Usage
  4. License
  5. Contact

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.

(back to top)

Designed exclusively for Windows. Functionality within Linux/macOS virtual environments may vary (e.g. wine).

  1. Clone/download the repo
    git clone https://github.com/nTh0rn/batch-raycaster.git

(back to top)

  1. Modify map.txt to contain the map of your choice. By default, the character '·' middle-dot, U+00B7, denotes empty cells.
  2. Double click raycaster.bat or execute from Command Prompt.
  3. Movement/aiming commands relative to the top-down map
    3.1 w=north, a=west, s=south, d=east
    3.2 z #=aim left, x #=aim right, where # is the number of degrees to turn.

NOTE: Run optimized/raycaster_optimized.bat instead of raycaster.bat for greatly increased performance at the cost of unreadable code.

(back to top)

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Nikolas Thornton - nthorn.com - [email protected]

(back to top)

Read Entire Article