08/23/25, Day 19 - breathe
I was right. It took me about ten minutes to figure out how to do what I wanted. I had to write the code completely myself, but it was 23 total lines of code split between two scripts.
There's two hours left in the night and I could probably make some progress on my next task, but honestly, I'm fried and I just want to relax tonight, so I'm going to.
I'd like to be able to just call it good and move forward with remapping the area, but I'm still agonizing over the combat. There's an unlockable treasure chest and I've been trying to figure out how to spawn an animated sprite the player can pick up and auto-equip as a weapon (for story purposes). I have absolutely no idea how to manage it. It seems like the answer is in an item array for loot, but I can't make heads or tails of how to get everything I want out of a resource.
To manage what I want, I need:
- The item to spawn automatically when the chest is opened
- The item to present as an animated sprite
- The player to be able to pick up the item
- The item to auto-equip as a weapon
- A printed message with a story-related comment
And, like, in theory this isn't hard. I've seen stuff like this in countless video games, I know it can be done. And I'm mostly sure this isn't difficult to execute, but I'm just completely lost as to how. I don't want to write like six new scripts all dependent on each other just to manage this one thing, because I don't want chests and loot to be a big part of the gameplay. Or at least, right now that's not what I want.
And I could probably just drop this for now and move on, and come back to it later. Combat is also not a major part of what I want this game to be, but I think a platformer completely void of combat would probably be kind of boring. I want the game to feel satisfying. I want every win to feel earned.
Other things I want to incorporate into the game are almost certainly a thousand times more complicated than this, and I dunno, maybe that's what's making it so frustrating. I know there's a relatively straight path forward here, but I'm just not finding it. And I need to find it, because outside this weapon-equip and a very basic hit/hurt exchange with an area enemy with 4 health, I just have to remap the area and make the "portal" to the second area. If I could figure out this fucking loot spawn I could probably be "done" within a couple of days.
And I mean, "done" is just being able to screen-record a walkthrough of the gameplay for this opening bit of the game so I can show my dad, and then after that keep working on the game as an entire beast and not just a tutorial area.
Anyway. I'm tired and I don't want to look at any more code today, so I'm not going to. I'm gonna go play a game and mind my business for the rest of the night, and come back to this tomorrow.
Thanks if you read this. I'm just using this blog to track progress and complain and share thoughts, I guess. Like screaming into a void, except I'm the void and sometimes I scream back.