20150516

Units and terrain

What traits of units can I reasonably change? First of all, what traits of a unit should have?

I already dumped health, energy, weapon quality, and things. So there is speed, type, hunger (see next post), and visual range.Of them, only two should be changed by terrain. I mean there is no justification for going through the forest as an archer, and somehow transforming into a knight in the end.

In Conquest if you are on sea level, you can't see what's on the mountain, but if you are on the mountain, you can see what is on sea level. I like this idea. There are little concerns about being at the border of the mountain, and not seeing my immeadiate neighbour tiles, but I think playtesting is the best way to address those worries.

Okay, should we do the same with forest? You can't see in the forest from outside, but you can see out from inside. That seem to make little sense, but we will see if players think it is counter-intuitive. At this point I sacrificed so much from perfection that these minuscule details doesn't bother me anymore.

Also, on the border of hills and trees - if you are on hills, you can't see in trees, and if you are in trees, you can't see onto the hills.

Water does not effect visual range, nor does grass. Unless you are really tiny.

But a huge question arises: how far should units be able to see? Wesnoth, again, had a good idea: units can see so far as far they can go in one turn. But my units can travel a distance of one tile in one turn, which is problematic, because you should be able to see if there is an enemy two tiles ahead of you, so you can change directions early to avoid it. This means you need to be able to detect enemies that are two tiles far.

Ok, what about every unit can see twice as far as they can travel in one turn? (And still can't look into forests or mountains.)  That seems reasonable. And we have the spies, a fourth unit type, which can't fight, but it moves twice as fast, and therefore can see twice as far. Perfect.

Now, the other trait: speed. The idea is that mountains and water are hard to go through, so we should halve the speed of any unit going through them. How to calculate it? Simply multiply the speed by the target tile's modifier. So no matter what tile were you on, if you are heading into a water/hill tile, you are going to travel with half of the normal speed.

When the turn is over, any unit going half speed will be on the edge of two adjacent tiles. Logically, they are on neither, but they can't change directions until they arrive on a tile.

I also want impassable terrain types. Deep water is impossible to go through, but you can see thorugh, while high hills are both impassable, and opaque, so you can't see through.

Also, visibility is calculated this way: anywhere a unit can go in two turns without changing terrain type (except to water/grass), and without taking speed modifier into account, is visible from the unit's current position.

No comments:

Post a Comment