Architecture to support random events breaking game loop / systems
Game development · 1.00
Summary · qwen2.5:32b
The article discusses the need for a robust architectural design in game development to manage interruptions of the game loop by random events, such as NPC deaths or ambushes, during simple quest systems like fetch quests. This architecture is crucial for maintaining gameplay continuity without resorting to complex if-else statements. One example given is an NPC who initiates a quest but then attacks the player, requiring the system to pause and resume the quest accordingly.
Suggested post angle
architecture for handling interruptions in game systems
Excerpt
<!-- SC_OFF --><div class="md"><p>I wanna talk about a specific system today. A quest system</p> <p>Let’s say it’s a simple fetch system. An npc asks you to go collect items and bring them back</p> <p>It’s very simple. However, without creating a mess of if-else statements, what type of architecture can support being able to interrupt the game loop / a system such as a quest system, and resume once the random event is over</p> <p>For example, the npc who wants something dies, or they attack the player, or a quest is actually an ambush but it’s presented to the player like any normal quest </p> <p>Obviously “anything can be coded without enough spaghetti”, but I want to figure out what a good architecture is to handle interruptions, and still keep track of everything</p> <p>Thanks</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/LifeExperienced1"> /u/LifeExperienced1 </a> <br /> <span><a href="https://www.reddit.com/r/gamedev/comments/1uohlgp/architecture_to_support_random_events_breaking/">[link]</a></span>   <span><a href="https://www.reddit.com/r/gamedev/comments/1uohlgp/architecture_to_support_random_events_breaking/">[comments]</a></span>