Weekly Update – September 24, 2021

I continued to work on combat this week, but shifted from core mechanics to “game feel.” After adding particle effects and sound effects, combat is much more satisfying. The game is getting closer to being fun. 🙂 

New Videos

Combat particle and sound effects

New GIFs

Blood splatter
Bone spray
Stone spray

This Week’s Achievements

  • Combat particle effects. I’ve never worked with particle effects. There’s a learning curve with Unity’s particle effects system, but being able to change settings in the editor and see the effect in real-time helped immensely. Also, I accelerated by learning my buying a particle effect package in the Unity asset store and studying how it worked. I created a few particle effects for when an actor/object is hit with a weapon. The target’s physical material determines the particle effect. For example, when a rat is hit it will spray blood, while a skeleton archer will spray bones and bone fragments. Additionally, the size and number of particles vary based on the amount of damage inflicted.
  • Improved combat sound effects. I was annoyed with the combat sound effects I chose. They were so quiet and boring. I was going to have to either find better assets, increase the volumes of the assets I had, or use the Unity audio mixer to get better sound. I was also running into an issue where the direction the sound was coming from was wrong. But, that issue ended up being a blessing in disguise because it made me realize why I was having low volume issues: the audio listener was attached to the main camera, which was way up above the player. When I attached the listener to the player, all the volume issues went away (though I haven’t fixed the directional issue yet).
  • Added hooks for additional sound effects, including dying, taking an object, ambient sound, footsteps, and walking on different types of terrain. Footsteps are challenging. I lowered the volume and slightly randomized the pitch of each step to make them less prominent and repetitive.
  • Right-clicking does something. Right-clicking on an object will display the Inspect Panel for that object. I should’ve done this a long time ago, but it was overlooked because the original target platform was mobile rather than PC.
  • Mapping the number keys to hotbar slots. Another basic feature I overlooked – allowing items in the hotbar to be used by pressing the corresponding number key.
  • Added probabilities to triggered game events. For example, when a pile of bones is destroyed, there’s a 50% chance that a ghost will spawn. This provides some unpredictability and more player choice.
  • Framework for player notifications in the Inspect Panel. When a player inspects an object, in addition to the description of the object, I want to communicate important gameplay information. For example, if the player inspects an object that is far away, I want to inform players that they need to be standing next to the object to interact with it. There’s now a framework for collecting notifications from various sources and prominently displaying them on the Inspect Panel.
  • Fixed many combat bugs. There were a surprising number of things that didn’t work or caused crashes. The majority of these bugs were from the last major refactoring.

Next Week’s Goals

Next week, I’ll continue working on “game feel” and small refinements that go a long way. I’m way off track on the milestone schedule, but I feel closer to being done than I think I would have had I stuck with the planned milestones. The additional content I was previously working on wasn’t making the game any better because the core loop was lacking.

Weekly Update – September 17, 2021

This week was much better than last week mentally. Prioritizing based on the most essential features to improve gameplay (currently combat mechanics) put me back on the right track and able to make solid progress.

This Week’s Achievements

  • Finalized combat calculations. The underlying calculations for combat had been a bit nebulous and only partially implemented up until this point. You could give and take damage, and kill and be killed, but combat wasn’t enjoyable due to lack of balancing and limited tactical options. This week I finalized the factors involved in determining when attacks hit and how much damage is caused. One of the ideas I went back and forth on was using armor class (AC) or damage absorption. The former was designed for tabletop RPG’s with the intent of simplifying mechanics by abstracting various aspects of defense. I chose damage absorption for several reasons, but primarily because it was the best fit within the overall combat system. Evasion and damage absorption effectively replace AC. Like AC, damage absorption is an abstraction; it attempts to model hits to both armor and areas that armor doesn’t cover.
  • Implemented combat calculations. All of the combat calculations are working in the game. The key attributes in the calculations are chance to hit, chance to evade, damage caused, and damage absorbed. These attributes are affected by various factors including equipped items, status effects, terrain, and physical material resistances/vulnerabilities.
  • Detailed combat logging. Every step of every calculation in combat is logged. Combat log messages are tagged so that they can be isolated from other log messages. This has been extremely useful for testing and troubleshooting.
  • Unit tests for all combat calculations
  • Combat balancing spreadsheet. This spreadsheet contains most of the calculations. It’s been a great tool for fine-tuning combat variables. It’s much faster than changing values in the Unity editor and testing through actual gameplay.

Next Week’s Goals

Next week, I’m working on combat feedback – sound effects, blood splatter, etc.

Weekly Update – September 11, 2021

It was a mentally challenging week, but ended on a good note. I did a project reality check and got discouraged by the amount of content I still have to create. I weighed some drastic alternatives including completely changing the vision to allow cutting most of the planned content, or (for a brief moment) giving up and focusing on my second biggest aspiration after game dev: writing a novel. I spent some time playing what I’ve built so far. While the current version succeeds at demonstrating the major mechanics, it’s a shallow experience. Many of the more subtle mechanics, largely pertaining to combat, aren’t implemented or are still broken from the refactoring I did a couple of months ago. That’s when it hit me that these details are the difference between boring and engaging gameplay. My highest priority is now completing these finer mechanics.

This Week’s Achievements

  • Damage modifiers based on physical material resistances and vulnerabilities. Damage is now increased when the target’s physical material has a vulnerability to the damage type, decreased when the physical material has a resistance to the damage type, and eliminated when the physical material is immune to the damage type.
  • Projectile-based spells. Spells that basically fire a projectile are partially implemented (they work, but I haven’t landed on a resource model yet). 
  • Consolidated redundant code for shooting and throwing items. Much of the code for shooting and throwing was the same. To implement spell casting, I would need to create yet another copy of that code. I decided to refactor and put the shared code into a parent class.
  • Fixed miscellaneous minor bugs involving drag & drop, room generation, AI, combat, and pathfinding.

Next Week’s Goals

Next week, I’m focusing on combat mechanics including equipped item modifiers, terrain modifiers, visibility modifiers, and melee abilities.