Tristan and Iseult - Week 2

13 Mar in nano, programming, videogames, VNs

Game MechanicsGame Mechanics

This time last week, I'd basically got so far as displaying the tilemap, displaying the groups-of-tiny-guys sprites, and doing the highlight-the-squares-yellow thing for their move ranges.

In the intervening time, I've:

  • Got the rest of the battle UI sorted - as you can see in the above screenshot, there's now fog-of-war and a neat little menu for the available unit actions.
  • Written some AI and pathfinding code.
  • Set up the dialogue windows the way I want them, sliding in from the left or right and carrying the character sprite with them.

The battle engine had some AI already, but it was very simple stuff that basically just tried to manoeuvre an enemy fighter into a position that was an 'optimal' distance away from player fighters, and it was pretty easily fooled by path-blocking scenery. A hand-to-hand enemy, for example, always wanted to move towards the player's fighters. Stick a single-square tree in the way, and it would happily walk past it 'cause it had sufficient movement to so sideways past the tree and also nearer the player at the same time... stick a U-shaped rock formation in the way and it would get totally stuck in the 'cup' of the U, because the only way to get out would be to move further away from the player, and that would be bad!

The obvious solution was to implement proper pathfinding, so the battlefields in the current work-in-progress version of the engine now have an A* implementation that allows you to optionally find the distance of a walkable path between two points instead of simply the as-the-crow-flies range, and I've been working on targeting configuration that allows you to select whether fighters or scenery blocks this path separately, and allow the path to pass through (for example) friendlies but not enemies. I needed all this for Tristan, but of course anything that can be written in a generic-use way will be pushed back into the engine itself.

The problem is that now I've implemented enough mechanics for the game to be playable, I start wondering whether there's anything I can do to make it more fun than it is. It currently shows its Advance-Wars inspiration very strongly, and while there are a couple of things I've been playing with to differentiate it a bit and try something different, they all have their downsides as well. For example, one thing that's pretty easy to do with the battle engine is change the way units are activated, so I tried switching from a straight-up turn-based system to a 'recharge' system similar to that seen in Final Fantasy games, where each fighter has a 'readiness' gauge and they can only act once it's filled up. This makes the battle more free-flowing and removes the big wait while the enemy takes their turn with every one of their units, but on the other hand gives you less control over the order in which your guys do things, and ultimately less tactical flexibility. Is it a good idea? I really don't know just yet.

(Another downside is that I've started to do so much extra stuff just to make sure that this game plays as well as it can that I'm wondering quite how good it is as a demo game for the engine!)

Now, I've been focussing on the battle stuff this far, because it's the part that I can get stuck into without needing too many extra graphics - important, since I do a lot of this stuff on my laptop at lunchtime at work with no tablet. But of course, it's a VN, so there'll be a story as well, and dialogue and character development and pretty pictures and everything. The other thing I've done in the last week is plot out all the important parts of the story, and over the next couple of weeks I'll take my big-events bullet-point list and flesh each item out into several scene lists, and then those will get expanded out into written scenes.

Comments

>>so I tried switching from a straight-up turn-based system to a 'recharge' system similar to that seen in Final Fantasy games, where each fighter has a 'readiness' gauge and they can only act once it's filled up. This makes the battle more free-flowing and removes the big wait while the enemy takes their turn with every one of their units, but on the other hand gives you less control over the order in which your guys do things, and ultimately less tactical flexibility

Well, in most FF games you didn't *have* to take an action as soon one character's gauge filled up ... if you delayed, the other units would continue to fill their gauges, and could act before (automatically, if they were an enemy; for friendlies, there was usually a button to cycle through all of your units with full time bars). So if you *wanted* your mage to cast some stat-boosting spell before the fighter went in to beat people up, that was always an option; just that if the fighter were quicker, you'd be "wasting" some time since he'd be ready first and then delay.

To be honest, when I said 'tactical flexibility' it's probably not quite the right phrase - it's more that it closes off a set of previously-viable tactics. In a strictly turn-based system, you can set your guys up one turn and then guarantee that in the next turn, you can move all of them and do your thing without the enemy being able to move his guys around part-way through.

For a simple example, if you have a unit of archers (weak but ranged-attack) one square back from a chokepoint and a unit of knights (strong hand-to-hand) in the chokepoint, this is a pretty classic defensive position. Now say your knights get depleted and you want to swap in a full-strength unit - in a straight turn-based game, you can guarantee that you can move one set of knights out and the other set of knights in before the enemy gets a chance to do anything; with a gauge-filling mechanic, there's every chance that an enemy unit will activate in between your old knights moving out and the new knights moving in, meaning they can attack and damage your vulnerable archers. Whether this is a bad thing or not is probably a matter of taste...

Another point, I guess, is that one thing I really like about Advance Wars is that it's pretty much deterministic to a chess-like level; not only do random elements not really have a bearing on your battles (if there's even any random factor at all), but it's reasonable for a player to be able to look ahead and think what their opponent might do in future turns. Activation gauges make that a lot less plausible!

Fair point. The FF-style system almost-but-not-quite lets you guarantee actions happening without interruptions occurring; if you wait until both units have full time bars and queue up the actions they'll tend to go consecutively but yeah; it could happen that an AI sneaks in between the two.

And certainly it's all a matter of taste, fully deterministic or not, turn based or time based ;) Which fits a game better probably depends at least in part on whether a unit represents a single person, or an actual *unit* of soldiers.

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.
Theme Originally by Antsin.com, hacked around by Jake, textures from grungetextures.com