3d checkerboard floors give the player the illusion of speed and direction in first or third person motion. Move your mouse to navigate around Press space to toggle sttf mode Press s to toggle stress test mode Update: Added infinite scrolling, skybox from @atomicmagicnumber and a fade to soften the grass floor as suggested by @chrome_cat
3d floors are cpu expensive. This uses ~40 triangles and <800 blocks and hopefully is backpackable with 3 global variables. Main perf improvements in the method are : 1. Only draw one color of the checkerboard 2. Only draw visible quads by culling on zclip and x-frustum 3. Camera pitch is offset on projection calculation 4. Reduces quad detail near horizon Added @chrome_cat STTF 16x16 texture. Took a while to figure out the winding order. - STTF is about 20% faster than 2 pen triangles - added if check (abs(x)<8192) before stamp in STTF_rightAngle_16 to avoid fisheye corruption near x edge. - added a diagonal pen line for android https://joeclinton1.github.io/texture-converter-js This uses an .obj model with 16x16 tiled plane (256), half it to 128 quads for one color. X and Z mods the camX and camZ to give an infinite floor effect. The camera pitch is offset on projection calculations but not the camera movement to reduce horizon tri count. Skybox sprite hides the snapping of new quad loading in on the horizon when in motion. Based off @ChromeCat_test excellent project "Simple 3D Engine" Skybox code & background from @atomicmagicnumber https://scratch.mit.edu/projects/677065493 Credit to @squidchip / for the original sttf method and for the perfected math and cross platform method