I'd probably have a lot less headaches if I'd implemented this MUCH earlier in the Game's development, but there is now a global data system online.
This provides a clean interface to Create Read Update and Delete global variables.
Primarily, it will be used by the HappyConditions / HappyEffects system for AI behavior.
Though, it can be accessed anywhere in the code.
It's wrapped in a nice little ScriptableObject for our designers to work with in the inspector but this monstrosity is a behemoth which will likely serve to replace the previous, overly-abstracted save data system (which worked on similar principles)
(it seemed like a good idea at the time)
The a lot of the improvement boils down to making the system play-nice with the inspector.
Now we are able to create / delete / change values at runtime.
(This wasn't as feasible on the previous Data-pile due to the fact it was an abomination)
Although we lose a lot of generically typed flexibility, simplicity and maintainability more than makes up for it.
I have never once needed to save a dynamically created AnimationCurve and now that the rest of the Game is more locked in, I know I will never need to save any Animation Curves.
It also causes a lot less problems with .Json serialization and prevents Developer-errors adding unsupported types directly to the base object Dictionary.
Comments
Displaying 0 of 0 comments ( View all | Add Comment )