Jump to content

Editor Scripts are a dangerous drug.


Oafkad

Recommended Posts

Tonight I found myself wasting a lot of time on two things. Oxygen Not Included (market research, I swear) and editor scripts. The latter was definitely a genuine waste of time. What I was trying to do is not urgent or necessary as I'm the sole engineer on the project. Once I broke out of that hole I started working on the status update action for the state machine of our kitties.

We've now got a container within the cats that houses the state of their needs, what that particular cat thinks is urgent or critical, and how quickly their rate decays. What I haven't decided on yet is how long an in game hour will be. This will likely dictate the true update frequency of these stats. Because checking the stats of every cat, on every frame, for every stat on those cats, will end up being a lot of loops every single frame.

Depending on our max cat limit that might not matter, but I'd like to not go so overboard in the beginning that I require some kind of complex overhaul just to make things work. So instead we'll just check if a new hour is upon us, and if it is we'll do the check. Another option is that I could have an event that fires each time an hour has passed in the game. We fire off an event that all of the characters are listening for. Then that adds the substate of status checking. It checks all the statuses. If any are in need of satisfaction it will update the target on the kitty and set their need target to that.

I just convinced myself of this now. I'm gonna add that to notion, good plan for future me.

Link to comment
Share on other sites

×
×
  • Create New...