IMPLEMENTATION AND COMPARISON IN USING STATE PATTERN ON MAIN CHARACTER MOVEMENT (CASE STUDY : POCONG JUMP VIDEO GAME VERSION 1.0) - Sintaro, Sanriomi; Salaky, Deiby Tineke; Latumakulita, Luther Alexander; Takaendengan, Mahardika Inra; Bernard, Bernard; Surahman, Ade; Islam, Noorul (BAREKENG: Jurnal Ilmu Matematika dan Terapan, 2023)
Game development success is often hard to achieve due to various problems such as performance issues, malfunctioning features, and poorly organized program structure. The problems that arise can be prevented by using the design pattern as a game programming architecture from the beginning of development. By implementing a design pattern, the process of developing video games can be made easier and simplified. The development team can focus its efforts on producing better quality video games. In this study, design patterns that would be used are state pattern and finite state machine. The state pattern is implemented by encapsulating the character's behavior in a class called state. Finite state machine will then facilitate the transition of states caused by user/player input or variable value changes. State pattern and finite state machine is tested with test case and game performance is tested with software metric. The result obtained from this study are state pattern and finite state machine have a valid component structure and could improve performance efficiency in video games.