I Need Sleep
Too Much Work Not Enough Sleep
Once again, I had a night of little sleep. I was tossing and turning all night because my brain just wouldn't shut off. But I really need to keep the momentum going on this project. Unfortunately, I'm not really sure where I was and what I should work on, so I'm just starting small to see how things go. I think the first step is going to be changes to the way my interactable script connect to the reset trigger. First I need to decide how exactly I want these things to work.
Ugh, so much thinking and planning. So I have this one node for interactables, and I need it to interact differently depending on the operational state. Right now my script is written in a way that doesn't exactly allow for these behaviors. I guess this means I need to completely refactor my interactables, again. Maybe today isn't going to be much of a working day and more of a planning day.
What To Do
So, I think I need to break out a couple of nodes off the root of the interactable. One new node for each operational status. I would move certain pieces of the existing functionality to one node, and then build out new copies of those same functions to the other. Some of the existing functionality will need to stay in the existing script, whatever is common between the operational status (such as the targeting and such). I guess I can start there, really. Just a couple of new Node nodes, each with a script attached.
So, I added two Node, each matching an existing OperationalStatus as defined in the script. Then I attached a new script to each. I also took this opportunity to move my interactable base scene into a subfolder, away from the other inherited scenes. It just feels a bit cleaner in the file system that way. Then I added a new dictionary to my existing interactable script to define the "name" associated with each operational status. It feels kinda redundant, but it's the Godot way! Like, why isn't there a simple way to just pull the enum name? Oh, there is!
I just learned something new, and I'm not sure if I believe it or not. Seems that when using the dot notation on dynamic nodes (such as when using get_node) you must first use the has_method to verify the function exists before calling it. Otherwise, even if the function is there, things may break? I dunno, I'm trying to understand. It seems specifically to the use case I'm investigating now, where I'm getting a node based on the string in a variable?
Oh well, I've added a couple of comments to make note of that when the time comes to actually write anything. Today is not that day though. My brain was already fried when I started this, and this is making it worse. Plus I've got a late night just about every day this week. I'm not sure exactly how much work I'll be getting done on the game until Christmas.
Next Time
I'm going to keep going, splitting my interactable functionality between the different operational states. I may not actually make any updates right away, I still have to figure out which functionality will go into the "working" state and which functionality will stay in the main node. That's an issue for later me to figure out though, for now I need a nap (although I know it'll never happen).
Xenodochium
The future is what you make of it!
| Status | In development |
| Author | Munchmo |
| Genre | Role Playing |
| Tags | 2D, Cozy, Godot, Indie, Life Simulation, Pixel Art, Sci-fi, Singleplayer |
| Languages | English |
More posts
- Interactable: Operational State Planning1 day ago
- Object State Data Fixes3 days ago
- A Quick Something3 days ago
- New Quests & Item4 days ago
- Welcome All4 days ago
- Bugfixing: Interactables and Focus Loss5 days ago
- Worldbuilding: Player Progression6 days ago
- Talking Points: Triggering7 days ago
- Let's Talk Prerequisites8 days ago
Leave a comment
Log in with itch.io to leave a comment.