Devlog: New Sidearm + Some Revamps

Smaller Recent Additions:
- Enhanced "Loot Detection / Pickup" logic
- Updated "Item Memory": (remembers items picked up by player)
- Reusable functions, resets at Game Over, Save / Load Game Data
- 8px High Water: allows water splash effect without speed decrease
- Tweaked Axe properties (it can destroy blocks now) (experimental)
- Tweaked Firebomb damage (now resembles CotM)
- Wallhugger Enemy (it loops around solid walls)
Save / Load Game:
One of the biggest new features is the ability to save and load game data, like in Zelda.
I haven't designed a save point YET; just the functionality to save & load (which I access via in-game hotkeys). Before then, I'll have to solve some additional problems first.
The game itself isn't being saved; the game is just remembering specific data its told to, like: player position, health, ammo, items and upgrades collected, and so forth. So any time I add a new feature the game needs to save, I must manually add it to the save / load functions.

Shield Subweapon:
A new sidearm appears -- the shield! I experimented with this weapon in the old engine, but it has never been truly featured. It has since changed in the way it functions.

This weapon exists for two reasons:
1. Solves a game design problem: allowing the player to carry 2 sub-weapons out of a total 4 means they have constant access to half of the entire arsenal, and may never feel compelled to pick up any new sub-weapons. Thus, we need more diverse sidearms
2. Provides another way to deal with projectile-heavy rooms or medusa heads.
1. Solves a game design problem: allowing the player to carry 2 sub-weapons out of a total 4 means they have constant access to half of the entire arsenal, and may never feel compelled to pick up any new sub-weapons. Thus, we need more diverse sidearms
2. Provides another way to deal with projectile-heavy rooms or medusa heads.
The shield is a defensive weapon that deals 1 damage to all enemies that touch it. So it is only effective against enemies with 1HP that die in a single hit.
When used, the shield will remain in front of the player until they run out of WP or perform any action that interrupts their "guard" (attacks, backflips, getting hurt, etc). The shield only costs 1 WP to activate, but will consume WP every time it hits an enemy (alternating 1 and 2 WP).
-
The old engine's shield constantly drained 3 WP per second and required actively holding the button to keep it up. Although this prevented the shield from invalidating any challenge, it also made the weapon too stressful to use. Hopefully this new design is a better compromise.
Implementing the shield in this engine was surprisingly complex. I ended up refactoring my enemy damage code and "weapon hitbox" feature. Weapons will no longer create a separate hitbox object (unless they are melee weapons), and will instead use their own collision masks to deal damage. Though in fairness, this is what I should've done to begin with.
Enemy Damage Scripts:
Enemies can now detect multiple sources of damage at the same time. Previously, they could only detect one source of damage at a time - which wasn't an issue unless the player wanted to attack an enemy that was already being burned by their firebombs.
This unfortunate quirk meant the firebomb would take longer to kill an enemy than it might in Curse of the Moon, as players could not expedite the process by attacking it while it burned. As a result, I ended up buffing the firebomb damage (but it still felt bad to wait).
However, now that this problem is solved, I've since restored the original damage values.
I am not entirely confident in this new system, as it uses DS Maps (Data Structures) to read a list of every weapon collision, loop through all of those weapons, check for various conditions per weapon, and finally add all of their damage together... It seems to work, but DS Maps are beyond my experience, and may result in memory leaks if handled improperly.

Water Variants:
We now have two variants of the o_zone_water object -- Poison and Hot Spring.
Players inside of a Poison Water Zone will take damage over time, and this damage does not trigger any iframes. As a result, players can still take damage from nearby enemies and can't exploit those iframes to avoid poison damage.
Players must instead carefully navigate these zones, use rations to heal through the damage, or use an item to negate the poison. So these poison zones CAN be quite dangerous.

Players inside of a Hot Spring Zone, however, will regain lost HP over time. Although the hot spring's healing powers are infinite, the process is quite slow. The player must wait within the zone for 2 whole seconds per tick of healing, requiring several seconds to reach Max HP.
These are a fun, flavorful, and diverse method of healing beyond simply hiding random wall chicken, and is a more unique secret to uncover. The waiting time also forces the player to slow down, providing them with respite from the potential stress of playing while they wait.

-
I've added so many things in the last two weeks, there's so many features that need clean up and sprites that need replacing.
Don't forget to eat & sleep.





