This is a simple, untextured raycasting engine built with Reprocessing and ReasonML
- Lode's Computer Graphics Tutorial - Raycasting
- Ray-Casting Tutorial For Game Development And Other Purposes by F. Permadi
- A first-person engine in 265 lines by Hunter Loftis
- P5 Raycast Demo by Brian Ma
(and Some Khan academy videos on Vector math)
yarn
yarn build
yarn start
To build to JS run npm run build:web
and then run a static server, like python -m SimpleHTTPServer
and go to localhost:8000
. If you're using safari you can simply open the index.html
and tick Develop > Disable Cross-Origin Restrictions
.
To build to native run npm run build:native
and run npm run start:native
The build system used is bsb-native.
You can use to arrow keys to navigate through the world.
If you want to change the change the map layout, you can do so by changing the values in the worldMap array
. 0
means empty space, 1
is a wall.
Knock yourself out!