Claim Missing Document
Check
Articles

Found 1 Documents
Search

Implementasi Logika Finite State Machine Dalam Perilaku Enemy Boss Dalam Game 2D Adrian, Reka; Akbar, Mutaqin
Jurnal Sains Informatika Terapan Vol. 4 No. 3 (2025): Jurnal Sains Informatika Terapan (Oktober, 2025)
Publisher : Riset Sinergi Indonesia (RISINDO)

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.62357/jsit.v4i3.663

Abstract

This study presents the implementation of a Finite State Machine (FSM) to control enemy behavior in a 2D game environment based on the player’s attack patterns. FSM is applied to manage dynamic transitions between states such as Idle, Attack, Teleport, and Summon. Each state is triggered by contextual gameplay variables including player proximity, number of consecutive hits, and enemy health level. The AI system was developed using the Godot Engine and GDScript, incorporating visual assets via sprite sheets linked to each behavioral state. The FSM framework allows the enemy character to react adaptively teleporting after repeated attacks and summoning reinforcements thus simulating intelligent behavior. System evaluation was conducted using black-box testing in simulated combat scenarios. Results demonstrate that the FSM-based AI provides enhanced gameplay variability, responsiveness, and strategic challenge, while maintaining system modularity and scalability. The findings support the effectiveness of FSM for real-time enemy behavior modeling in 2D games and offer a reference framework for future development of adaptive AI in interactive digital environments.