Month: September 2016

Fiancée Game – 08 – A Little of Everything

Estimated Hours of Work Since Last Update: ~15

   As per protocol it’s been a while. As per protocol life has been busy for me. Alas, it seems that whenever I finally get into a good rhythm of working on Fiancée Game that everything gets chaotic all of a sudden. Strange.

   Anyways, I’ve got an update. A fairly substantial one. Lots of stuff has been done in the ~5 weeks since my last post. I also set up a Trello page if you’d like to follow development as it goes on, minus the witty banter that I know you all come here for. I’m not going to go over every little thing that I’ve done, but I’ll cover the major stuff here. If you want a more granular look at everything that’s taken place for this update, use the link to the Trello page above.

Of Tooltips and Optimization
   The most time consuming thing I’ve worked on for this update has to have been either tooltips of game optimization. I completely rewrote the tooltip system from the ground up. It’s a lot faster now. Like, a LOT faster. It also supports multiple kinds of tooltips instead of just tooltips for items.


We now have tooltips for stats!

   While I was working on tooltips I’d noticed some fairly heinous slowdowns. Fiancée Game typically sits at around 400 FPS on my system. For whatever reason, tooltips were slowing this down to about half that (!!!). The reasoning behind this was how I was displaying them. I’d originally had the tooltip display running once per frame for every object that could display a tooltip because I was being a lazy ass (and it wasn’t particularly harmful to the FPS early on). However, as time went on, the number of objects increased and running the same bit of code ~100 times per frame does have an impact on performance.

   The fix was easy enough. I stored all objects that could have a tooltip in a global list. Once I’d done that, I moved the displayTooltip function from those objects to my IO handler that checks the list once per frame. If it finds that an object should have a tooltip displayed it displays it. There is now no FPS loss for tooltips.


I also prettied up item presentation a bit. Item subtypes were added, too.

Skills and Leveling
   Gaining levels has been implemented. I’m still fooling with experience point requirements but I’ve got the larger details set. I’d originally expected a fairly low max level, but I’ve gone back on that. Instead of the level cap being the original ~20 that I’d initially planned, I’ve bumped it to 100. Why? Well, future-proofing, for one. I don’t expect that the ‘base’ Fiancée Game is going to have enough content to it to even remotely hit the level cap. The Fiancée™ has, however, demanded that there be future expansions, so I’m leaving room for those. I expect the base game will be completed in 30th to 40th level range. Or more, assuming she grinds a lot. Which she does.

  Currently gaining a level nets you some extra health and energy based on your class. You also get ability score points and skill points. The rates that these points are gained vary based on the level band you happen to be in at a given time. Skills and abilities are gained quickly at lower levels, but less frequently as the levels pile on.

   There’s currently no grand fanfare when you gain a level, just a message in the message box. I’ll eventually get some sort of graphical flourish implemented so that the player knows they’ve gained a level.

   I’ve begun implementing skills. I currently have all the basic skills for the rogue skill tree implemented. While getting skills working (and getting the UI put together for them) I discovered that I’d have more room than initially intended — almost twice as much space, actually.


We also have tooltips for skills.
There’s still some formatting work that needs to be done.

   My original design for Fiancée Game was to have four tiers of skills. With the new UI put together I have room for seven. I spoke with The Fiancée™ about this and she was okay with the idea of an expanded skill system. We brainstormed how we were going to handle the extra tiers and settled on a ‘specialization’ system. How it will work is that the first three tiers of skills for a given skill tree are considered ‘basic’ skills and anyone can learn them. Tiers four through seven are considered ‘specialized’ skills and when you hit a specific level (I’m leaning towards around 12, or so), you’ll pick a specialization and be stuck with it for the rest of the game. You can have a specialization in each skill tree that you’ve invested a certain number of points into.

   Each skill tree will have three specializations (the rogue’s, for example, are acrobat, assassin, and thief) that offer different styles of play within a given skill tree. Using the aforementioned rogue specializations: the acrobat is for avoiding damage via evasion, assassins are great for single target damage and damage over time, while thieves are good at stealing things from enemies and getting more treasure in general. In addition to unlocking specific active abilities with each specialization, a specialization will grant passive bonuses as well. The assassin, for example, will grant bonuses to damage with daggers and will add a poison-based damage over time effect to the rogue’s bandoleer/fan of knives and dagger toss abilities.

   I’d originally thought to lock the specialization trees behind skill point expenditures, but with the rate that skill points and ability score points are gained I’ll likely just go with a “you have to find the trainer” method instead. I think it’s better this way anyways since it will encourage exploring the world more than just hoarding skill points instead of spending them on interesting skills.

The Stuff I Work On Instead of Fixing Bugs
   It hate bugfixing. Not because it’s hard, but because it’s time consuming and often tedious. I fix critical bugs, but most smaller niggling bugs remain, or have been given band-aid patches.

   Instead of fixing the bugs in my old spaghetti code, I instead implement totally unnecessary features that really should wait. But they don’t. Because I hate fixing bugs.

   So, what has this amounted to? Three big things as of right now. First was loot piles (and examine text):


My inner loot whore is breathing heavily right about now.

   I programmed loot piles mostly as an exercise of boredom. I’d just finished debugging some god-awful bit of combat-related horribleness and wanted to add something to the game as opposed to fixing things that I’d broken. Loot piles were the result. They’re hand placed but I have the ability to fill them with random goodies from a list as well as have a chance to not even spawn. Yes I fully intend to plug one of these things in somewhere that has a 5% chance to spawn and then another 5% chance to spawn some stupidly powerful item. Because I can. And because The Fiancée™ needs to know that this game hates her.

   With the loot piles I also implemented examine text. It’s fairly simple: if the player right-clicks on an object in the world it pops up a bit of descriptive text in the message box. You can examine objects, but not things like walls or doors (I would hope that we all know what those are). I eventually want to have it display the description somewhere more prominent on the screen, but there’s no rush for that. I’ll probably use this descriptive text system at some point in the future to give hints to the solution of puzzles or the location of secret areas.

   Up next came in-combat damage splats which I shamelessly burgled from the excellent Eye of the Beholder games — buy them on GoG (or, failing that, watch either my or Captain Planets’ LPs of them (#shilling)):


Believe me when I say that my splats were… lacking.

   While I’m generally opposed to adding ‘pretty’ things unless they’re necessary at this point in development, I’ve felt that combat needed some feedback-related love for a while now. I added these because, dammit, who doesn’t like seeing damage numbers flying around?! I fully intend to have combat-related sound effects implemented for the next update.

   And, finally, monster spawners:


It spawns things that want to kill me.
Joke’s on it; player death isn’t implemented yet!

   These were implemented because, frankly, I got tired of having to restart the game to continue killing stuff. I guess it’s a good sign that I like running around murdering things. Means the core gameplay isn’t completely terrible. It’ll be better once I’ve gotten more combat-prettiness implemented and have got the skill trees filled out.

   Oh, and I also implemented a basic music player. No screenshot for this one (still haven’t mastered filming sound waves quite yet), but it’s there. Music now changes depending on whether you’re in combat, exploring, creating your character, and so on. I’ve got the music player implemented in such a way that I can have exploration music changed based on tile that the player is standing on. This will be used for per-zone music. Handy stuff. I mostly play with the mute on, though, since listening to the first ten seconds of the same track over and over again has somewhat begun to grate on my nerves.

Bugs that I Did Fix
   Only a few bug fixes for this update. Truthfully most of the bugs that are currently running around are so minor that I just ignore them the majority of the time. They’re things that I’ll need to take care of eventually, but I think it’s more worthwhile to be implementing new features than fixing them. Still, I did take care of a few:
   – Enemies weren’t dying when reduced to exactly 0 health.
   — Pretty simple mistake. I was checking an enemy’s health improperly (health >= 0 is alive), easy fix.

   – Fixed a reference bug for enemy Attack values.
   — This was another easy fix. I’d borked up the reference code somehow and each enemy was referring to the next enemy in line’s attack. I didn’t even notice this until I was working on a boss monster whose attacks really shouldn’t have been missing and yet inexplicably were. Sneaky little bug.

   – Fixed a camera display issue that cropped up when the player was on the edges of the playable area.
  — This bug was caused by how I have the player peer forward and down when standing on a ledge. The script itself works by referencing the cell ahead of where the player is standing. If the player was at the edge of a map there’s no cell to reference (null reference error) and it would lock up the camera. I simply added a check to make sure to only call the ledge peer when the player was in an area it would actually work.

In Closing
   While I haven’t had nearly as much time to work on Fiancée Game as I’d like to have over the past month, I’m more than happy with the amount of work I’ve gotten done in the time that I did have. Hopefully things will keep moving along this quickly! Thanks for reading!

Read More Fiancée Game – 08 – A Little of Everything