Skip to content

nTh0rn/batch-raycaster

Repository files navigation

Batch Raycaster

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

About

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)

Getting started

Prerequisites

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.

Installation

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

(back to top)

Usage

  1. 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.
  2. Execute raycaster.bat (or raycaster-optimized.bat for better performance at the cost of unreadable code).
  3. Movement/aiming commands are relative to the top-down map. See CONTROLS.txt.
    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.

(back to top)

Troubleshooting

  1. 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/.

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

(back to top)

License

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

(back to top)

Contact

Nikolas Thornton - nthorn.com - [email protected]

(back to top)

About

A Wolfenstein3D-like raycaster made in Windows Batch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published