XaiJu
Brellom
Brellom

patreon


Game Dev - Mar 2025 #01 - New Item Features

It has been a while since my last devlog, but here's a small update! I spent the bulk of this last week working on two main additions.

New Items:

Previous demos only contained one food item - pancakes, which healed 6HP. However, I have just added two new food items to the game (and buffed the pancakes).

This allows me to better curate the balance of encounters and give healing items to players more often, but with smaller health gains. It also creates an opportunity to hide more items in a level, and make pancakes more rare as a result.

Small Orange [2 HP], Cheese [6 HP], and Pancakes [12 HP] (may be changed to 10).

I've also added a new item: the 1Up Doll, which grants an extra life upon pickup. The design was inspired by Zelda 2: The Adventure of Link.

The pancakes have also been redesigned.

Item Memory:

In older demos, items & candles respawn when entering a room. You could conceivably farm health & items by moving between rooms, so levels had to be strictly linear.

My solution is inspired by how Super Mario World handles its item memory (for coins), using a "Struct" to track flags (variables) for collectible items.

When an object is destroyed (or picked up) in-game, it sends a unique "Index ID" to the Struct. When an object is created in-game, it checks to see if its unique Index ID already exists in the Struct - if it does, it will destroy itself - essentially preventing its respawn. The ID format is:

Room Name + Object X Coordinate + Object Y Coordinate

There are some issues; if the object spawned in a different position before being picked up (like after falling due to gravity), the [Destroy Event] ID will not match the [Create Event] ID. However, that shouldn't be a problem since most objects are static, so I don't have to fix it.

The "Item Memory" Struct will be destroyed & recreated on the Game Over screen, allowing items to respawn after the player has died. This will not apply to permanent upgrades like Heart Containers, however.

The objects currently saved by Item Memory are: 1 Up Dolls, Candles, and Breakable Blocks. Furthermore, items spawned from within candles & blocks can only spawn once as a result, unless otherwise specified.

Neither of these are particularly large additions, but they will be meaningful in the long-run. Don't forget to eat & sleep.

Comments

Reading that was pretty exciting and I like the new additional healing items that are being added into the demo! That and I sort of understood a bit of that Item Struct stuff, with the little knowledge I have from my coding classes I took a couple of years ago. Very happy to have read this dev blog!

Ethan Moreno

That food is looking mighty tasty.

Shawn Heatherly


More Creators