Archive for July, 2009

Status: Working…

Posted in CRPG, Development, TI-99/4a on July 17th, 2009 by adamantyr – 2 Comments

Work continues on retrograde work on the travel engine. Massive redesign of the character system means a lot of old code needs to be fixed, adjusted, and so forth. I got a clean build on my current travel code, so now’s the rough part of rebuilding the executable. Since I made file changes, a lot of static data has to be changed as well.

I may actually side-track from the combat engine a bit to complete some other parts of the travel engine, such as inventory management and spell casting/item usage. The reason for this is that the same code will be used by combat.

Other code is also shared. For example, the control system is focused on the characters. Only meta-commands like saving the game are independent of which player is currently active. So the system to determine what actions are possible are shared by the travel and combat modules alike, with some small differences.

It’s too bad that Classic99′s file system doesn’t quite work with the assembler. If it did, I could compile and build things much faster and more conveniently, with confidence that I’ll be able to get them into MESS later without any complications. (Hint hint, Tursi…)

State management in the game has been interesting as well. I ended up with more states than I had originally, and I decided to keep it as separate counters for each rather than having a set size of four positive, for negative.

The reason for this is simple; a little extra data space ends up costing less than the processing code to manage state limits. This is a sacrifice frequently made in low-memory assembly work. The TMS9900 opcodes take up two bytes each, and a single line can run as much as six bytes. So unless the code changes are only a few lines, it’s usually not worth the trade-off.

For a bit of color in an otherwise dry post, here’s the current states in the game a character/party can have:

  • Sensing. You can see traps and secret doors on a small compass during travel immediately around you. Rogues have this ability automatically at no cost; otherwise the spell is party-wide.
  • Stealthed. Your party cannot be seen by monsters on the travel map, who move randomly rather than towards you.
  • Stepwatch. Your party cannot be poisoned or damaged by natural terrain like swamps or magical tiles.
  • Magic Eye. Your party can view the entire map window with no line-of-sight blocking.
  • Exalted. Bonus to attacks and defenses.
  • Cursed. Penalty to attacks and defenses
  • Hasted. Bonus to all speed, one extra action per combat.
  • Slowed. Penalty to all speed, one less action per combat.
  • Empowered. Reduced fatigue cost for actions.
  • Weakened. Increased fatigue cost for actions.
  • Regenerating. Heals wounds over time, increased fatigue recovery while traveling.
  • Poisoned. Takes damage over time, no fatigue recovery while traveling.
  • Armored. Bonus to all defenses.
  • Blurred. Immune to melee attacks.
  • Confused. Moves randomly, attacking randomly.
  • Charmed. Treats allies as enemies, enemies as allies.
  • Enraged. Melee attack and speed bonus, defense penalty.
  • Invisible. Cannot be seen on battlefield.
  • Afraid. Runs away from enemies, does not attack.
  • Immobilized. Cannot move.
  • Invulnerable. Immune to all attacks.
  • Mindguarded. Immune to being charmed, confusion, and fear effects.
  • Protected. Has full defense against all damage types.
  • Repel. Immune to ranged attacks.
  • Shielded. Can block as if using a shield.
  • Warded. Immune to sorcery attacks.
  • Light. Generates a light source.

Fatigued…

Posted in CRPG, Development, TI-99/4a on July 13th, 2009 by adamantyr – 2 Comments

Okay, I think I have something worked out… enough that I spent time changing files to match a new set of schematics.

I basically ended up coming back around to hit points after all… but my plan at the moment is that they’ll remain static. I may have usable items in game that boost them, but the amounts will be small. Getting better weapons and armor is your best way of making your characters stronger so the blows do less damage.

I also kept my stamina idea, which replaces mana. That way every class has it and it’s used for both spells and attacks.

I also decided to borrow an idea from Tunnels of Doom and have wounds and fatigue that track against health and stamina. So instead of having a value that goes down, you have a value that goes up. This is mostly for cosmetic purposes; it works well in assembly because it means an unsigned value never goes negative, but it also means you have to do a comparison to find out when you exceed a threshold. It works out to about the same amount of work.

And finally, here’s a quick mock screenshot of combat…