Clover’s Toy Box development posts for 2017 and 2018. I originally shared these privately but now I’ve collected them all to publish.
Clover’s Toy Box (as in Pandora’s box) is a project to develop a game engine for the successor to Turtle Arena and another game. The engine, named after Lycoris radiata subject to change to a common name, is expected to expand on ideas and goals from my Spearmint engine (albeit without Quake 3 compatibility). Clover’s Toy Box is currently being developed in private as proprietary software.
January 20, 2017
A day in April 2016 I made a green window and log keyboard events. Recently I added logging of mouse and joystick events and limited updates to 125 frames per-second. It also runs in a web browser (not at 125 FPS though). SDL and emscripten make it all pretty easy.
Then I think to myself “I should port this to the Wii!”, except that due to the fact it doesn’t really do anything yet the Wii port would basically consist of a Devkitpro Wii example template; but with the screen filled green. Very. Exciting.
Clover’s Toy Box lines of code: 623.
Quake 3 Arena lines of code: approx. 150,000.
January 25, 2017
Clover’s Toy Box now uses OpenGL and can draw in 2D perspective. It can draw textured triangles and rectangles (aka two triangles). Now I’ll be able to add text drawing!
Clover’s Toy Box lines of code: 1,094.
January 27, 2017
Clover’s Toy Box can now draw text. It runs on the Raspberry Pi 3B with 7 inch LCD as well.
Clover’s Toy Box lines of code: 1,288.
April 22, 2017
Two game clients (left: native GNU/Linux, right: web browser) sending mouse movements to a game server [far away, same continent] and back.
Now it’s fast and smooth.
~40 millisecond round trip time.
60 server to client updates per-second.
1,686 lines of network code, including a custom WebSocket implementation.
25 days since I started adding networking into Clover’s Toy Box.
December 27, 2017
Added 3D perspective rendering with cubes and vector math for moving the camera using WASD keys relative to the camera direction. The vector/matrix math was tested with the cubes forward(blue), right(red), up(green). Though, it’s more interesting when the direction centered at the white cube is actually rotating.
Next is probably expanding the network code and adding game objects with client-side prediction.
Clover’s Toy Box lines of code: 13,203.
Quake 3 Arena lines of code: approx. 150,000.
June 20, 2018
I got my turtle model from Turtle Arena working in my new engine project Clover’s Toy Box.
It uses skeletal animation instead of per-vertex animation like in Turtle Arena (which is to say, positions for 50 bones are stored for each animation frame instead of positions for 3,000 vertexes). Less memory usage and will allow for dynamic animation changes in the future. It required writing an (Inter-Quake Model) model exporter for the program I made the model in (Misfit Model 3D).
Getting animations working correctly in Toy Box took a lot of time comparing computed joint matrices between Toy Box, Misfit Model 3D, and Turtle Arena. Though there was also issues with the data I was passing to the OpenGL API. Joint matrices were transposed (correct values in wrong order) and joint weights were passed directly in the range of 0 to 255 instead of being normalized to the range of 0.0 to 1.0.
After animations and textures were working I made Toy Box draw 512 turtle models (8x8x8 cube) as pictured below. Surprisingly it actually runs at 60 frames per-second.
The main purpose for all this was getting models working in Toy Box, having a test model, and a way to export Inter-Quake Models notwithstanding Blender. I guess this all took about two weeks. There is still much left to do with cleaning up and commit the code changes to the three different projects involved and I don’t know, supporting loading more than one model at a time.
September 5, 2018
I converted Turtle Arena’s subway level to an IQM model so I can render it in Toy Box. Areas around flags are black because there is no alpha sorting yet. There isn’t collision yet either.
Turtle Arena .bsp -> q3map2 (to .obj) -> mm3d (to .iqe) -> iqm.exe (to .iqm) -> Clover’s Toy Box. lol
October 28, 2018
I was messing with how many cubes/spheres I can draw at 60 frames per-second and trying to improve performance.
I’m overly entertained by drawing 15,000 spheres (1.2 million triangles) at 60 frames per-second.
November 5, 2018
I added sprite rendering to Toy Box and then Doom-style 8 sided sprites. This is Freedoom player.
Congratulations. You made it to the end.