Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
The levels are stored as 6 bytes per "brush" (i.e. block): 1 byte per each x, y, z coordinates and width, depth and length[1]. The y (vertical) resolution of these values is a bit higher than the x/z resolution to allow for stairs while allowing for bigger levels on the horizontal plane. So the level files are not directly stored as a grid, but as a collection of axis aligned blocks.
The collision detection however builds a grid out of these, so the game can quickly look up any position within the game world[2].
[1] https://github.com/phoboslab/q1k3/blob/master/pack_map.c#L78...
I'm honored that Q1K3, in addition to many other entries to js13kGames 2021, is compresed with Roadroller [1], which is the reason that its source code is basically a random-looking string plus some bit of JS code.
[1] https://github.com/lifthrasiir/roadroller/
I like the idea of TTT. When I discovered the JS13k I made a Texture generator ( https://github.com/Lerc/stackie ) with for a game that I never quite got around to. I didn't make that game but I have used Stackie in a heap of projects.
Mine came in at a whopping 2k but could generate some very nice stuff from compact strings.
Looking at the different approach of TTT. I wonder if I could rip out the core of Stackie that makes a (x,y)=>number and add it as a layer to TTT.
Related posts
- Mini Metroidvania in 13KB of JavaScript
- Game Boy Wordle clone: How to compress 12972 five-letter words to 17871 bytes
- Cat Goric: Escape from the Warp Chamber - Post-Mortem
- Announcing Node.js 22.0.0: What’s New and Why It Matters
- How to Make a VS Code Extension Using TypeScript: A Step-by-Step Guide