Today’s bug

So for the last few days, I’ve occasionally seen a weird graphic glitch like this;  a big band of white at the very bottom of the screen, drawing over world and UI and everything.  It would show up infrequently.  Perhaps once every hour of testing, and it would last for about three seconds, and then not be seen again for another hour or so.

Well today, I finally figured out what it is.  You folks who have the benefit of seeing it as a still screenshot have a better chance of guessing;  you might be able to make out the half-illegible text at the bottom.  This band of white is the remnant of the message display that would appear at the bottom of the screen in MMORPG Tycoon v1.1, when a user gained a level or completed a quest.  That message display was drawn using the “overlay” system that I talked about in a few ancient posts.

Suffice to say that when I modified the VectorStorm rendering engine to focus on fast rendering rather than eccentric rendering, that “overlay” system stopped working.  So with the new fast-drawing graphic engine, you don’t get v1.1’s gentle blue gradient backdrop; you just get a massive solid white block.

I was finally able to track down this graphical glitch today because I’ve fixed an awful lot more bugs today which resulted in it being visible on screen a lot more often than it used to be.

Here’s a small sample:

  • PCs now fight all the monsters that are attacking them, before they continue on with other activities.  (Previously, they would kill one and then get bored of fighting and go do something else instead, allowing monsters to continue attacking them, undefended)
  • PCs will no longer stop to rest while closing to attack a monster.
  • PCs now get quest credit for monster kills even if the PC is interrupted by monsters before reaching the canonical “quest location”.  (which typically is in the middle of a whole bunch of monsters;  previously, monster kills didn’t count until after the PC had reached that quest location).  Now, if the PC kills a monster that counts towards a kill requirement for a quest, then he is immediately given credit for reaching that “quest location”.
  • PCs will now successfully return to a quest giver to pick up the later quests in a quest chain.  (broke this a few days ago)
  • If a PC wants to do a quest, but there are no known quests available, he’ll become annoyed and do something else instead.  (previously, he would sit exactly where he was, forever, until he eventually became annoyed enough to unsubscribe)
  • Fixed PCs sometimes getting double-credit for monster kills.
  • Fixed PCs getting double-XP for quest completion of combat quests.

Here’s the thing.  I’m now at the boring point of development;  debugging AI behaviour.  It means I’m spending a lot of time just watching what the AI does, watching for things it doesn’t do at all or doesn’t do correctly, and then trying to fix it.  I can often be just staring at a single PC for five or ten minutes, just watching as he runs quests, waiting for him to do something wrong.

So not the most fun part of the development process.  Good thing I’m not making a game that requires a lot of complicated AI or anything, eh?  :)