Hello. I'm at a point in my learning where I see potential to make a big mess and want some advice before that happens. Particularly, how to organize game systems like inventory, damage calculation, level variables (eg. locked doors -> remain unlocked even after the level scene is reloaded).
For Inventory (consumable items, weapons etc), what I've done so far that seems to work is create a global script called PlayerInventory, within it is a list of every item as a boolean variable to indicate if the player has it or not. So now when the player travels through different level scenes, their inventory is persistent and any upgrades remain. Seems to work so far.
But how would you go about doing this for a locked door in a level scene? One way is to tie it to a key, in the player inventory - if "key" == true, "locked" = false. Ok, fine. What about a wooden crate that has been destroyed by the player? How would you keep track of the crate's destroyed state without it being tied to a "key item" in the PlayerInventory global script? Is the solution to create more global scripts, like "EnvironmentChanges"? What script should be responsible for remembering this and where should it live?
With regards to a damage calculation system, I think the high level question is similar- how to organize this? The path I'm going down looks like, "DamageManager" global script which handles the calculations and updates, meanwhile the player and enemy scenes have an "HP" node added, with the "hp" value variable set by the parent (the player or that specific enemy).
I'm looking for high-level ideas about how to make these things work together and to keep it as easy to maintain and organized as possible. More details and specifics are welcome, too. Thanks
Getting emails faster than you can read and respond to them, and they are all urgent exceptions.
Meetings that could have been emails, wasting your time while the real emails continue to stack up.
Askng important questions (via email) and getting ignored, or only some of the questions addressed.
Visits from the newest suit talking about how great their new ideas will be, just like the last one who said the same thing and was replaced after 6 months.
It is a lot like the movie Office Space, except in current times instead of one job you're doing the work of 2.5 people and making less than Peter did in 1999.