WASD to move Arrow keys to look around
All by me except the binary insertion sorting (by @TheGreenFlash: https://scratch.mit.edu/projects/382939992/), triangle filler and z-clipping (by @tsf70 and @KryptoScratcher) This is mainly about rendering terrain as fast as possible. I had to make my own 3D engine for this to run fast enough. This uses an LOD system which makes it run much faster for larger view distances. It splits the world into a few meshes which are each a different distance away from the camera. Each mesh is drawn with the same number of quads, so further away meshes are larger without having to use lots of triangles. I also did some more work to fix the seams, and I added some optimisations which are designed specifically for this. This processes quads instead of triangles, it only sorts during generation, it uses binary insertion sort (which is a lot faster than regular insertion sort), and it only processes vertices that are part of visible quads instead of processing all of them (which can be used in full 3D engines). There are some more things I added for the terrain generation and there are still some more things I'm hoping to add, but that's all the important stuff. I WILL ADD PERLIN NOISE OR SIMPLEX NOISE IN THE FUTURE SO IT WON'T BE SINE WAVES FOREVER I might try out quadtrees if that makes this run any faster