Didn't know someone had already written something similiar, tho.
Mateusak wrote: ↑ Wed 11:00 pmIf you say so Yeah the Amethyst one was so interesting I decided to copy.
The term nondeterministic has a different meaning, related to whether one of the exponential ramifications of the state transitions leads to an acceptance state or not (and an acceptance state has little meaning in this case).Īnyway, the classification was brought up in relation to whether 'state' was an appropriate name or not. The fact that you invoke callbacks on the others doesn't have an influence on the structure of the state machine. You really just have one active state, the one at the top of the stack. But as far as I understand, doesn't a deterministic pushdown automaton implies that the states beneath the top one are not active and have no effect? While you could certainly achieve that with my scene stack, you could also have multiple active states, which makes it a sort of hybrid between NPDA and DPDA.įrom a state transition standpoint, I think it's mostly a DPDA. Since the scene stack can be in multiple 'states' at the same time, it doesn't fit in the more traditional DFA, but I'll admit it can be considered an NFA (which honestly should be preferred over nested DFAs).Īnd although the concept and implementation of the scene stack is simple and it does have downsides, it's very time consuming to implement a FSM that can achieve the same level of flexibility, especially for games with few 'states' which is the focus of the scene stack. This is not a FSM, so I would hardly call it generic.įor the fun of theory and because I know someone will accuse it of being some sort of FSM, a FSM is defined as an "abstract machine that can be in exactly one of a finite number of states at any given time". I've been in the game industry for many years and by far the most common way of managing game 'states' (which is a term I preferred not to use in this case due to it's allusion to state machines) is using some form of nested FSM. Zorg wrote: ↑ Fri 7:13 pm logic is uncaring that said, future prospects are extending your lib with other functions that may be useful that way it won't be just another generic/simple state manager on the block!