From 918fd72507a38b013134fe0d6d075b46ae714798 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Thu, 31 Dec 2020 17:32:34 +0000 Subject: Update README.md --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 9754243..c74eddf 100644 --- a/README.md +++ b/README.md @@ -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) + +![](https://jamesbarnett.io/files/raycaster/raycast2.png) + +## 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/ -- cgit v1.2.3