I made a raytracer 3d game in desmos.
I remember, many years ago, making a very similar thing in Scratch, the block coding website, by following a Griffpatch tutorial.
Lying in bed one evening I thought, Hey, that wouldn’t be so hard to make in desmos. So I pull out my laptop and get to work.
Twenty minutes later I have a working first version. I grin, proud of myself. Little did I know the rabbit hole I would delve into in the next few days, flushing it out.
I added different resolution settings, A way that has the lines be the right thickness no matter the FOV. I made a Map mode, where you can view the Map, and a map editor (not great).
The Maps are another topic. They are made from a list of 3D points. (I really have to stop making saved things from 3D point lists. If anyone has a better way for me to have more data per list item I would be sure to take it.) The points in the list are formatted as such (Slope, Y-Intercept, and a single edge on the right side (How I wish I could have more data per list item)
I made a “Flashlight Mode” (Not what it sounds like) That, when opening map mode, will show dots where you are seeing a wall. Using lines from each of them to the player dot, I made a really laggy view polygon, this shows everything you can see. (Its in a note because it is still laggy without showing the lines)
I recently learned how to make “Buttons” on the screen of a desmos graph, and added player controls on-screen. I also designed terrible arrows to position on the buttons. I went a little haywire with adding buttons, but I guess I wanted to be able to do everything outside of the left-side, other than settings. I also added a “Map” button in the top left of the
I then spent an additional hour and a half organizing every function and line into folders, bringing the total line count to 75.
If you want to check it out, I’ve shared a snapshot below.