My understanding is that the switch statement was for npc character conversation text. That seems pretty reasonable, even in enterprise SaaS for something like translations. It might not be as easy to maintain in other circumstances.
My understanding is that the switch statement was for npc character conversation text. That seems pretty reasonable, even in enterprise SaaS for something like translations. It might not be as easy to maintain in other circumstances.
This usually results from an inadequate system-subsystem decomposition and/or not considering modes, both of which lead to hierarchal state machines instead of one big flat one.
This aspect of architecture is difficult to teach, it is one of the "black arts" that comes from experience and is difficult to codify.
Just one example why, is that often it might require the synthesis of state machines not directly evident as needed from the functionality, eg to perform a one to many or many to one functionality.
can't find the actual code, but its a look up table for what dialogue to use. The existence of a switch statement does not force the code to be a state machine.
it could still be some architectural deficit around making it harder to look up the dialogue rather than having it in place when uts triggered, but it makes it nice to understand all the dialogue in the game at once
Almost everything is state based behaviour.