Codename Mimir devlog 2: Timeline

In the previous (and first) devlog, I introduced Mimir and showed some progress on displaying the ship and adjusting its appearance based on interactive JSON values.

In this devlog, you can see that many JSON objects over time can be used to represent a fight between ships. This is how (for now) the backend will send the fight to the frontend.

Note that most of this devlog won't work if you have JS disabled. I'm writing these to be a kind of interactive devlog, since being a web based game makes it possible to do so.


I added a starfield background, which was a fun foray into writing fragment shaders. Fortunately shadertoy has plenty of example to learn from.

Additionally, I wrote some logic to update the fight state over time based on a list of JSON objects, which is how the backend represents a fight.

Underneath the example you can see how each step is represented as a JSON object. The animation is "jumpy" because I have slowed down the rate at which the state is updated, to make it easier to see the steps.

The bits in between the steps are interpolated, so the ship will smoothly move between steps. This makes it possible to adjust the game rate independently. It will be useful to tune this to trade off between smoothness and how much server space is used to represent the fight.