GitHunt
XT

xtrinch/raycasting-game

3D game using raycasting written in Javascript

3d game created with raycasting in Javascript / React

The general idea for the math setup and walls raycasting is taken from https://lodev.org/cgtutor/raycasting.html.
It uses vectors to define our direction / camera plane instead of angles.
The ceiling / walls are instead raycasted using arbitrary quad mapping on 2d html canvas as drawing pixel by pixel has turned out to be too slow for javascript.

The general setup is done with React, using Mobx as state management.

See it live at https://xtrinch.github.io/raycasting-game/.

Languages

TypeScript98.4%JavaScript1.0%HTML0.5%CSS0.1%

Contributors

Created March 9, 2025
Updated March 9, 2025
xtrinch/raycasting-game | GitHunt