IMPLEMENTASI FINITE STATE MACHINE UNTUK MENGATUR ALUR NARASI GAME VISUAL NOVEL MYSTIC PAGES - Yason, Clarissa; Fajar, Mohammad; Zaman, Baizul (STMIK KHARISMA Makassar, 2025)
Visual novels are a genre of video games that emphasized the delivery of interactive narratives, where players engaged with the storyline through a series of choices that influenced its direction and outcomes. In the development of Mystic Pages, a mystery-themed visual novel, challenges were encountered in managing branching storylines. Conventional methods such as if-else structures and flag systems were found to be inefficient and prone to logical errors when applied to large-scale scenarios. Therefore, this study aimed to implement a Finite State Machine (FSM) as a solution to manage dynamic and structured narrative flows. The storyline was represented as states within an FSM diagram, starting from the “start dialog” state to the “dialog pack end 5” state, with narrative progression determined by player choices. The results demonstrated that the documentation and visualization of Mystic Pages’ branching storylines using FSM facilitated modifications, as developers only needed to add new states and transitions without disrupting existing logic. Furthermore, black-box testing confirmed that all transitions between states operated correctly, with no issues such as dead ends or infinite loops. All branches executed as designed, achieving a 100% success rate.