Posted October 18, 2020 by triplefox
#programming #engine development
Since I originally made this page, I have gone through four or so iterations on Galapagos and it's changed a lot because actually following the principles I set out is really difficult!
What happened is that as I drew closer and closer to a working runtime, I started on tools and frontends and started to discover all these unresolved issues. How many settings should be presented? Well, if the intended format is simple enough, none. But if it's like an emulator, as many as possible. What about saving data? How do I archive it in a way that's "sustainable"? If you're debugging a project you want extra settings. And so on and so forth.
What I gradually realized I had run into - and as March rolled around and lockdowns hit, started to contemplate more deeply and gave a name to - is what I call the "terrarium problem". The terrarium problem is this: the larger your programming ecosystem is, the more of it you have to carry around, and the harder it is to reproduce. If you try to cover everything in your terrarium, you get a modern operating system like Windows. If you try to cover a minimal set like PICO-8, you still encounter edge cases over the smallest things like how standard libraries behave or how joystick input is polled. And most of those features are commodities - they don't really influence the creator or the audience because they're taken for granted, but they have to exist. If you(as the designer of the system) try to kick the can down the road and implement solutions with high generality, you haven't really solved anything - the user still builds their own terrarium, and each time you do that, the "point" of using the system as a functioning whole diminishes.
This was a particularly big problem with the idea of using WebAssembly. When you look at it from afar, it seems like a VM that runs compiled languages is just the thing. But the closer you get to building with WASM, the more you become entangled with the specific mechanisms by which WASM is built - which assumes you are, in fact, targeting a web browser. It's not just code and memory. The standard library has to bootstrap off of something to get access to I/O, and so all this other stuff gets baked in when you build your code. I concluded that it wouldn't be sustainable at all, in fact!
So I looked into ways of realigning the project to reduce the size of the terrarium. This led me through a cycle of build and compilation systems, further changes to backends, further changes to the programming model to embrace source code first, another version of compliation systems using a "binder" organizational metaphor, and finally, the one I'm feeling settled on right now:
A common binary data format, a set of libraries compatible with existing game engines (which I will write reference code for), and some tools for working with those things.
This is less integrated than I originally imagined, but what I determined is that a sustainable system that addresses the terrarium problem has to coexist with change and chaos, and be able to reorganize. And this does that. It solves the terrarium problem along a few different axes:
Having said that, what's the timeline look like on this new take on Galapagos? Simply put, it's become more of an open-ended background project, after spending a long time being the top thing on my mind. I am taking a break to work on pinball simulation but want to return to Galapagos periodically, first to solidify the binary format, and then to work on specific tools. Maybe things will start to appear by the end of the year at this rate.
And as I do that I'll probably get around to updating this page, so, stay tuned.