<aside> 💡 js13k is 30-day competition to create a browser game in 13kb of code or less. I am documenting my project here and on twitter.

</aside>

Related Posts

Pt 1: Theme Announcement & Project Setup

Pt 2: Writing a 3D Engine (after trying not to)

Pt 3: Using Bitmap Caching to Unlock 60fps in 3 Dimensions

Contents

JS13k 2020 is a wrap, and I'm happy with what I learned and many of the things I built, though I missed by a mile on delivering my overall vision for my game. This last post is a quick rundown of what I thought was most notable about my final architecture, with a focus on the camera and procedurally generated bitmap caching that enables scenes like this one to be rendered at 60fps in Canvas2D contexts:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1bc2633b-1a15-4c37-ae44-12dc68b55ffd/Untitled.png

Camera that caches

As background, I set a few requirements for my game at the onset which took some creativity to meet:

In part 2 I wrote about the construction of my 3D engine. However, in order to get it to operate well in Canvas 2D I knew I needed to offload the vast majority of the work to the GPU. The geometries I ended up creating in Blender typically had between 6-17 faces consisting of 3-8 vertices each. It was infeasible to have the CPU calculate the vertex position for each point during each frame.