Landcruisers and Boar Heads

Airships: Conquer the Skies
13 Jul 2015, 8:19 p.m.

So I'm just about finished with work on tracked landships. Compared to ones with legs, they're faster, sturdier, but less able to deal with rugged terrain.

In terms of game physics, they're held up by a set of springs much like legged ships - essentially a suspension. Wheels and tracks are drawn on top of this. The wheels are simple to draw, but the tracks are made up of lots of individual links. They alternate between big links with surfaces that touch the ground and slightly smaller ones. You can see what this looks like in real life on this image of a Japanese tank I used for reference.

Now the Hard Bit was calculating the shape along which the links are drawn. The track needs to run along wheels and between them. It boiled down the track being composed of two strictly alternating types of sections.

Curves following a wheel between two angles.

Straight lines that connect two wheels.

Curved sections can be of length zero, which happens when three wheels in a row are perfectly in line. Finally, there needs to be some special casing for when three wheels in a row form a concave shape, as the tangential lines connecting wheel 1-2 and 2-3 would cross in that case.

Once I'd coded that all up, I tried it out with debug graphics, then spent some time fiddling with things so that the rotation of the wheels gets correctly fed into the offset of the link drawing. Or to put it simply: making the tracks move!

The results look pretty good, I think.

Now as you may know, the heraldry system in the single-player campaign lets you select a heraldic charge (a symbol) for your side's coat of arms (your flag or "logo") that gives you some bonus. For example, the scales give you extra income from cities, while the lion improves your troops' abilities at boarding combat. With such a major new feature, there of course have to be some new bonuses. There are going to be three. I will unveil the first one now, the second in the next blog post - and the third one when v7 comes out.

Boar's Head Erased
+20% HP for tracked landships
Unknown Charge
?
Unknown Charge
?

So what's next? I'm just working on making the crew smarter so they can move across the ground, between ships and floating rocks, enabling them to do things like transfer between ships. Beyond that, there's about two dozen bug fixes and then it's time for dev7.