After losing a bunch of time to a hardware failure, I’m starting to get back on track with this project. As you can see from the GIF above, I’m giving some attention to the combat system.
I’ve been pretty indecisive about how I wanted combat in this game to turn out. I was initially thinking about a menu-based approach – something kind of like Bard’s Tale or Might & Magic. I wanted to be tactical, but I also always felt like the tactical combat in games like Ultima bogged things down a little too much.
While pondering this, I also came up with an idea for a streamlined tactical system that I might try sometime, but that only makes sense in a game with a party of multiple characters. Maybe we’ll hold onto that idea for later.
Instead, what I’d like to do is keep all combat on the “main map” and use things like range, cover, and area of effect (AoE) to make things interesting. Last Retrochallenge, I added a very simple attack action so that I could build a prototype quest. The next step was to be able to attack things that weren’t immediately adjacent to the player.
Once you’re attacking things far away, it becomes really important to have a visualization of what’s happening. As you can see above, the graphics I’m using are very similar to something from Ultima. The full map drawing routine is still much too slow to create a smooth animation, so to make the “missile” effect look decent I wrote a function to temporarily replace a map tile on screen, storing the original tile data so it can be redrawn afterwards.
I also needed to make sure that the player can’t shoot through walls or mountains. At first, I used the same IsTerrainTraversable() function I used to determine if the player could walk through a space, but that doesn’t quite give the right result. For example, it meant that the player couldn’t shoot across a square of water, which didn’t make a whole lot of sense. (On the other hand, being able to shoot at an enemy across a water barrier might be a really powerful ability!) So I’ve added the idea of different kinds of visibility / traversability to the terrain types.
Going forward, I could see some ways to have fun with this tech. For example, maybe somewhere down the road I could give the player a laser rifle that can shoot through wooden walls, or something like that.
There’s still a bunch of stuff in the combat system that isn’t fleshed out yet:
- To-hit rolls (currently player attacks always hit)
- Damage amounts (currently doing fixed damage)
- Monsters can’t actually attack yet (!)
- What kind of treasure or experience does a monster provide when it dies? Right now, this is hard-coded for the Mammoth, and only for the Mammoth.
I also want to dig into a spell system, because that’s where some of the interesting AoE effects come into play. We have to have a fireball spell, after all.