Timeline for How to structure a dynamic turn based system?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2023 at 19:45 | vote | accept | blue | ||
May 23, 2023 at 8:45 | comment | added | Philipp | @blue In that case I would refactor the "Play Animation" state to a "Play Animations" state (plural) that manages the animations of multiple objects at the same time and pops itself when the last one finished. I could also imagine a class "CompositeState" that includes multiple regular states. But that makes a couple things more complicated. For example, what happens when those sub-states try to push new states or try to pop themselves. | |
May 22, 2023 at 17:09 | comment | added | blue | Thank you, this was incredibly helpful. Using this kind of structure, is there a good way to manage things that need to happen at the same time? For example, if two enemies need to play a death animation at the same time. Could I simply add a list of states to update during one queue slot or is there a better way? | |
May 22, 2023 at 9:10 | history | edited | Philipp | CC BY-SA 4.0 |
added 72 characters in body
|
May 22, 2023 at 7:46 | history | edited | Philipp | CC BY-SA 4.0 |
added 51 characters in body
|
May 22, 2023 at 7:38 | history | answered | Philipp | CC BY-SA 4.0 |