Penerapan Algoritme Finite State Machine Berbasis Fragment Shader Untuk Proses Pengambilan Keputusan Pada Non Player Character (Studi Kasus Game Battle Tank)

Maulana, Muhtadin Ziqi (2018) Penerapan Algoritme Finite State Machine Berbasis Fragment Shader Untuk Proses Pengambilan Keputusan Pada Non Player Character (Studi Kasus Game Battle Tank). Sarjana thesis, Universitas Brawijaya.

Abstract

Non player character (NPC) merupakan karakter dalam sebuah permainan yang tidak dikendalikan oleh pemain, melainkan dikendalikan oleh komputer melalui program yang dibuat oleh manusia. Dalam model gameAI NPC memiliki karakter untuk melakukan pergerakan dan pengambilan keputusan. Dalam penelitian kali ini penulis menggunakan algoritme finite state machine (FSM) dalam proses pengambilan keputusan. Proses komputasi dalam pengambilan keputusan dari NPC pada umumnya dilakukan oleh central processing unit (CPU). Namun terdapat sebuah ide untuk mengembangkan algoritme FSM yang menggunakan graphics processing unit (GPU) sebagai proses komputasinya. Yaitu dengan melalui program fragment shader. Yang mana dalam proses tersebut diharapkan dapat menambah performa dari algoritme FSM. Dikarenakan proses dilakukan CPU dan GPU dilakukan secara paralel. Dimana GPU melakukan proses pengambilan keputusan algoritme FSM sedangkan CPU melakukan proses movement dari agen NPC. Penerapan dari FSM berbasis fragment shader dibuat dengan menggunakan tiga buah map yaitu agent map, world map dan fsm map. Agent map digunakan untuk menyimpan data state yang sedang dijalankan oleh NPC. World map digunakan untuk menyimpan data event dan trantition rule dari FSM. Sedangkan fsm map digunakan sebagai proses perpindahan state ke state yang lain. Algoritme FSM berbasis fragment shader tersebut penulis diterapkan pada permainan batlle tank. Setelah melakukan proses pengujian terhadap pengaruh jumlah NPC dan pengaruh ukuran peta didapatkan beberapa hasil. Untuk pengujian satu, lima, sepuluh dan sebelas NPC secara berurutan mendapatkan nilai 147, 69, 24 dan 1 FPS. Yang mana menunjukkan bahwa jumlah NPC berpengaruh terhadap algoritme FSM berbasis fragment shader dikarenakan semakin banyak jumlah NPC semakin banyak juga proses FSM yang dilakukan. Untuk pengujian pengaruh ukuran peta permainan dilakukan dengan pengujian ukuran peta 20x20, 30x30 dan 40x40 secara berurutan menghasilkan nilai rata-rata 66, 61 dan 60 FPS. Hal tersebut menunjukkan pengaruh ukuran peta permainan yang semakin besar maka semakin sedikit nilai FPS yang didapatkan. Dikarenakan semakin banyak proses yang dijalankan.

English Abstract

Non player character (NPC) is a character in a game that is not controlled by players, but is controlled by a computer through a program made by humans. In the gameAI model the NPC has the character to make movements and decision making. In this research the author uses the finite state machine (FSM) algorithm in the decision making process. The computational process in decision making from NPC is generally carried out by the central processing unit (CPU). But there is an idea to develop an FSM algorithm that uses the graphics processing unit (GPU) as its computational process. That is through the shader fragment program. Which in the process is expected to increase the performance of the FSM algorithm. Due to the process carried out the CPU and GPU are carried out in parallel. Where the GPU performs the FSM algorithm decision making process while the CPU performs a movement process from NPC agents. The application of FSM based on fragment shaders is made using three maps namely agent map, world map and fsm map. Agent maps are used to store data states that are being run by NPCs. World map is used to store event data and transition rules from FSM. Whereas fsm map is used as the process of transferring state to another state. The FSM fragment based shader algorithm applies to the batlle tank game. After testing the effect of the number of NPCs and the effect of map size, some results were obtained. For tests one, five, ten and eleven NPCs, respectively, scored 147, 69, 24 and 1 FPS. Which shows that the number of NPCs affects the FSM fragment shader based FSM algorithm because the more number of NPCs the more FSM processes are carried out. To test the effect of the size of the game map performed by testing the map size of 20x20, 30x30 and 40x40 sequentially yielding an average value of 66, 61 and 60 FPS. This shows the effect of the size of the game map that the greater the fewer FPS values obtained. Because more and more processes are run.

Item Type: Thesis (Sarjana)
Identification Number: SKR/FTIK/2018/937/051900591
Uncontrolled Keywords: Non player character, finite state machine, fragment shader, battle tank, pengambilan keputusan.-Non player character, finite state machine, fragment shader, battle tank, decision making.
Subjects: 000 Computer science, information and general works > 005 Computer programming, programs, data > 005.1 Programming
Divisions: Fakultas Ilmu Komputer > Teknik Informatika
Depositing User: Sugeng Moelyono
Date Deposited: 19 Apr 2020 23:48
Last Modified: 17 May 2022 07:13
URI: http://repository.ub.ac.id/id/eprint/166845
[thumbnail of Muhtadin Ziqi Maulana.pdf] Text
Muhtadin Ziqi Maulana.pdf

Download (2MB)

Actions (login required)

View Item View Item