Monstrously Complicated

So I decided to switch things up a notch, and move over into monster A.I.

Why? Well, the FX spell system is now definitely working, the only tasks remaining are to implement and test out each spell individually. This won’t actually take too long. The only real complicated bit left is the alteration spells that cause battlefield changes, like creating a wall of fire.

I’m more concerned right now with removing a lot of the short-cuts and implementing the full pipeline for combat. This means actually checking for victory conditions, determining treasure, and returning back to travel mode cleanly. And as part of that… monsters actually doing stuff!

So my original architecture for monsters was, well… very ambitious. I had four different intelligence levels, the highest of which would consider spell casting as a “high threat” and target that character specifically. Every monster would have “aggravation” counters to determine who pissed it off the most. Spells would include at least two offensive and defensive spells: a ranged attack, a close attack, a self defense and an ally defense. And finally every potential action a monster would take would be weighted on priority and the best one selected each turn.

Then I realized how much code space it would take up to implement all this. I currently have around 8k of space left for code, and I still have a LOT of other stuff to implement. Creating the simplest and easiest monster A.I. to start with and then adding to it and updating it later when all the major pieces are done makes a lot more sense.

Plus, on screen, all a player is going to see is a monster take a step towards them. All that cleverness will be invisible and undetectable. Is there really a difference between a monster making a ranged attack on a character because it was the most properly weighed action, or just at random?

Plus, I don’t really want the combats to take a long time. Playing Ultima IV made me realize that when you have an awkward interface and no way to skip a lot of things, the combat can really become a hassle. (Get into a battle with reapers. You’ll see what I mean.)

And finally, it’s very VERY possible to make the monster A.I. just too damn good. If monsters all target the character who just threw a fireball at them with ranged attacks, that character won’t be alive long. It’s a general truth in most computer games that it’s pretty easy to write artificial intelligence that’s TOO good. You want it fun and challenging, not bone-grinding difficult to impossible. (Unless you’re playing Wizardry of course…)

The new simplified A.I. is pretty simple. A monster finds the closest target enemy unit and either moves towards them, targets them with a ranged attack, or targets them (or their location) with a special attack/spell. The one thing I need to add in and figure out is when a monster should use a close attack. A dragon breathing fire, for example, will want to have the player very close, and preferably none of its companions in the way!

I’m in a frame of mind now that before I release another demo, I should have as much of the game implemented as possible. That means not just the A.I. but also all the town services and everything needed to actually play the game. I really want to FINISH the game engine and start focusing in earnest on actually writing the story and designing the game itself.

This entry was posted in Coding, CRPG, Design, TI-99/4a. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *