Use TurboWarp if this is too laggy: https://turbowarp.org/852195158/fullscreen?fps=60&hqpen&stuck WASDQE for movement Arrows and 1 and 3 keys for rotation Use the !SCENE slider to change scenes, then press the green flag. I do not recommend running 2 and 3 on vanilla Scratch. Use the !CAM CONTROL slider to toggle between 6 DOF(degrees of freedom) movement and 5 DOF movement
I wasn't planning on releasing this but I did so anyways. This is how you banish gimbal lock(for @Robostew). It's pretty easy with quaternions. WHAT IS THIS? This is part of rebuilding Gamma Engine from the ground up. The previous save(https://scratch.mit.edu/projects/808824832/) had shadows but there were a lot of bugs. I patched most of them now, and there is only one that I'm aware of so far. I also patched some pretty bad BSP bugs shortly after releasing the last save. If you are interested in the technical details, I learned yet another thing from @Chrome_Cat: to use circularly linked lists for polygon vertex pointers. Also normal buffers will save a lot of computation and will make the code cleaner. As for the polygon vertex pointers linked list, it gets converted to a regular array after compiling all the data. This way the rasterizer does not need to use one of those "repeat until" loops. To overcome gimbal lock, I just didn't use gimbals lol The solution was to rotate around the camera's up, forward, and side vectors, which are always orthogonal, unlike gimbals which can become linearly dependent. The controls feature 6 degrees of freedom(6 DOF) FURTHER NOTES: There are definitely still some ways I can speed this engine up. Maybe I'll convert the world transform quaternion to a matrix and multiply the vertices by that instead. Also, feel free to tinker around with the engine so far, and find any bugs. FINAL THOUGHTS AND WHAT IS NEXT: I really need to make a demo soon. Also I need to make my first actual game. I also think there are some more space partitioning stuff to be played around with. Prepare for 's upcoming ChromeEngine CREDITS: 3D BSP sort adapted from 's 2D BSP sort. Compare the code, which can be found here: Triangle filler by ():