diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2020-12-31 17:32:34 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-31 17:32:34 +0000 |
| commit | 918fd72507a38b013134fe0d6d075b46ae714798 (patch) | |
| tree | b8834937dc6556f915f18ade1825f4298e69b149 | |
| parent | 58ff14f5c31b933a1d2f91d6cae7280366d3ffb9 (diff) | |
| download | kotlin-raycaster-918fd72507a38b013134fe0d6d075b46ae714798.tar.xz kotlin-raycaster-918fd72507a38b013134fe0d6d075b46ae714798.zip | |
Update README.md
| -rw-r--r-- | README.md | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -1,2 +1,19 @@ -# kotlin-raycaster -A simple pseudo 3D raycasting engine in Kotlin-JS +# Kotlin Raycaster + +A simple pseudo 3D [raycasting](https://en.wikipedia.org/wiki/Ray_casting) engine written from scratch in Kotlin, targeting the browser with [Kotlin/JS](https://kotlinlang.org/docs/reference/js-overview.html) and rendered using only vertical lines drawn on an HTML5 canvas. + +Interactive demo [here](https://jamesbarnett.io/raycaster) + + + +## Process +Raycasting is a simple rendering technique allowing [2D map data](https://github.com/jamesbarnett91/kotlin-raycaster/blob/main/src/main/kotlin/Map.kt) to be shown in 3D perspective. +It has several limitations, most notably that all walls must be vertical and of the same height, and the camera perspective can't move vertically up/down (although it's possible to implement these by extending the core raycasting concepts). + +Raycasting was used in early 90's 3D games, most famously [Wolfenstein 3D](https://en.wikipedia.org/wiki/Wolfenstein_3D). + +For a in-depth explanation of raycasting see the links below +- https://lodev.org/cgtutor/raycasting.html +- https://permadi.com/1996/05/ray-casting-tutorial-table-of-contents/ +- https://github.com/vinibiavatti1/RayCastingTutorial/wiki +- https://dev.opera.com/articles/3d-games-with-canvas-and-raycasting-part-1/ |