Raycastlib Raycastlib (RCL) is a [1]public domain ([2]CC0) [3]LRS [4]C [5]library for advanced 2D [6]raycasting, i.e. [7]"2.5D/pseudo3D" [8]rendering. It was made by [9]drummyfish, initially as an experiment for [10]Pokitto -- later he utilized the library in his game [11]Anarch. It is in spirit similar to his other LRS libraries such as [12]small3dlib and [13]tinyphysicsengine; just as those raycastlib is [14]kept extremely simple, it is written in pure C99, with zero dependencies (not even [15]standard library), it's written as a single file single header library, using no [16]floating point and tested to run interactively even on very weak devices (simplified version was made run on [17]Arduboy with some 2 KiB of RAM). It is very flexible thanks to use of [18]callbacks for communication, allowing e.g. programming arbitrary "[19]shader" code to implement all kinds of effects the user desires or using [20]procedurally generated environments without having to store any data. The library implements advanced features such as floor and ceiling with different heights, textured floor, opening door, simple [21]collision detection etc. It is written in just a bit over 2000 [22]lines of code. The repository is available at https://codeberg.org/drummyfish/raycastlib. ................................................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ...........XXXXXXXXXXXX/..........XXXXXXXXXXXXXXXXXXXXXX.......................o ...........XXXXXXXXXXXX////.......XXXXXXXXXXXXXXXXXXXXXX......................oo XXXXXXXXXXXXXXXXXXXXXXX//////.....XXXXXXXXXXXXXXXXXXXXXX...............ooooooooo XXXXXXXXXXXXXXXXXXXXXXX/////////..XXXXXXXXXXXXXXXXXXXXXX........oooooooooooooooo XXXXXXXXXXXXXXXXXXXXXXX//////////.XXXXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooooo XXXXXXXXXXXXXXXXXXXXXXX//////////XXXXXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooooo XXXXXXXXXXXXXXXXXXXXXXX//////////.XXXXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooooooo XXXXXXXXXXXXXXXXXXXXXXX/////////..XXXXXXXXXXXXXXXXXXXXXX........oooooooooooooooo XXXXXXXXXXXXXXXXXXXXXXX//////.....XXXXXXXXXXXXXXXXXXXXXX...............ooooooooo ...........XXXXXXXXXXXX////.......XXXXXXXXXXXXXXXXXXXXXX......................oo ...........XXXXXXXXXXXX/..........XXXXXXXXXXXXXXXXXXXXXX.......................o ................................................................................ ................................................................................ ................................................................................ ................................................................................ Simple rendering made with raycastlib. Links: 1. public_domain.md 2. cc0.md 3. lrs.md 4. c.md 5. library.md 6. raycasting.md 7. pseudo3d.md 8. 3d_rendering.md 9. drummyfish.md 10. pokitto.md 11. anarch.md 12. small3dlib.md 13. tinyphysicsengine.md 14. KISS.md 15. stdlib.md 16. float.md 17. arduboy.md 18. callback.md 19. shader.md 20. procgen.md 21. collision_detection.md 22. loc.md