Day 5.1 - Leaping and stumbling


Finally, jumping. (Currently picks a jump randomly.) Added it quite quickly right at the beginning of day 6, hence a late writeup. The first thing to go well for a while, after another disastrous day.

Day 5 was spent on computing all the available jumps, with collision checking, and more mapgen foundation.

It's been five days and I'm still only halfway through the things I said on day 2 I planned to get done on day 3! Charitably that's half the pace, actually more like 1/4 pace. We still expect to have something playable though.

So the tiles are 48x48 pixels. We thought that was pretty big, so we decided to actually use 24x24 "subtiles" for graphics and collisions, so that we could have thin platforms so that you could get an extra half a tile of jump height. Writing collision checking with subtiles became an ordeal. Wish I'd just ported the wallmap collision checking I wrote for the OHRRPGCE, and in fact I did partially port it when I got fed up. Why didn't we just use Godot's collision system with TileMaps? Not after our experience doing so with Slumber! And it's better to have control.

I first tried finding the jump velocity to reach every reachable tile using physics derivations, but that doesn't work because you have a choice of how high to jump and need to avoid obstacles. Finally I just tried a couple hundred trajectories and see where they end up. A simple solution that took way too long to settle on.


The circles show where you get a turn in midair. Not sure whether to do something about those a hair away from landing.

Oh, and drawing those curves, another big time sink.

Then I updated all the map code for subtiles and stripped out most of the rest the old mapgen code we don't need. Writing from scratch would have been faster.

At last I finished and updated the placeholder mapgen code to use subtiles. Immediately decided writing mapgen for subtiles is a huge pain, so decided not to use them. Luckilyy I used constants, it was easy to disable them in all the code I wrote...

Get Battletier Ascend!

Leave a comment

Log in with itch.io to leave a comment.