Jurnal Sains Informatika Terapan (JSIT)
Vol. 4 No. 3 (2025): Jurnal Sains Informatika Terapan (Oktober, 2025)

Implementasi Logika Finite State Machine Dalam Perilaku Enemy Boss Dalam Game 2D

Adrian, Reka (Unknown)
Akbar, Mutaqin (Unknown)



Article Info

Publish Date
30 Oct 2025

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.

Copyrights © 2025






Journal Info

Abbrev

jsit

Publisher

Subject

Computer Science & IT Control & Systems Engineering Electrical & Electronics Engineering

Description

The scope of this journal is all about Computer Science that are: 1. Artificial Intelligence 2. Computer System 3. Data Mining 4. Information System 5. Decision Support System (DSS) ...