Jump to content

ID Management and State Machines


Recommended Posts

  Alright! First we've got good news, N number of cats is now working with the state machine. My individual cats all have their own behaviors and are walking around, eating, sleeping , etc, on their own time and personal needs. This is HUGE! I'm very happy with this and it will be a good stopping point for the night for me. A very, very large commit to be pushing.

  I've moved away from custom plugins for Guids and Dictionaries, I've just spun up my own solutions and they work without issues. This will also help reduce variables going forward in case anything breaks. Also for those of you playing the home game, I realize now my mistake on ID management for assets in the scene.

  I had been assigning custom IDs to assets as they were spawned. This is fine "in theory" but what happens when it is something like a Moosecat? Then you've got two unique IDs for the same asset, one is their Moosecat ID, and the other is the ID of their gameobject. This is not acceptable and was a big part of why my state machine work wasn't working as intended.

  So going forward I'm going to actually take my design from they player and Moosecats and pass that along to the items and interactables as well. These assets will have their own internal data structure that tracks their ID, state, and anything else we need to know. Doing this means I can serialize and deserialize this data trivially, I don't need to clone SOs each time an object is instantiated, and in general it reduces complexity by literally 50%.

  That's all upsides and will be the source of my work tomorrow. Once that is done we can probably move onto integrating some wild Moosecats for fun and see how many we can spawn before it becomes a computational problem. Maybe we'll track some metrics tomorrow to show off!

Link to comment
Share on other sites

×
×
  • Create New...