W and S to move forward and back A and D to move side to side E and Q to move up and down Right and Left Arrows to turn yaw Up and Down Arrows to turn Pitch F and G to show and hide the extra variables Look at the indicator in the corner to see current rotation
All code and visuals by me. All code is commented so feel free to take a look. How it works: The basic idea is that you have some X and Y position on the screen, and you divide that by some distance Z to make it smaller with distance. In my code I added an extra variable "fov" which makes the effect less extreme. From there I used trig to rotate the points, and rendered triangles and lines into it. After that you basically just add a way to interact with it, and add any details you want. The most recent feature is to add depth sorting to planes to put closer faces in front of further back ones Why I made this: I've been trying to figure out 3d rendering for a while, but now I've finally figured it out. The basic goal of this was to make a 3d rendering without using any math I don't understand, I ended up successful, as you can see, and it taught me a lot about how games actually work.