Chulalongkorn University Theses and Dissertations (Chula ETD)
Other Title (Parallel Title in Other Language of ETD)
โครงร่างการสร้างแบบรูปศัตรูในเกมยานยิงแบบอัตโนมัติโดยใช้ไวยากรณ์ไม่พึ่งบริบท
Year (A.D.)
2024
Document Type
Thesis
First Advisor
Vishnu Kotrajaras
Faculty/College
Faculty of Engineering (คณะวิศวกรรมศาสตร์)
Department (if any)
Department of Computer Engineering (ภาควิชาวิศวกรรมคอมพิวเตอร์)
Degree Name
Master of Engineering
Degree Level
Master's Degree
Degree Discipline
Computer Engineering
DOI
10.58837/CHULA.THE.2024.287
Abstract
This research proposes a framework for generating enemy patterns for SHMUPs game. It is directly based on a grammar derived from the enemy behavior of existing commercial SHMUPs, and implemented using a new description language called "Enemy Pattern Description Language" (EPDL). EPDL contains all information required to construct the enemy, with no requirement of external data content. The language is human-readable and can be connected to any game engine of choice using an EPDL interpreter. The interpreter itself consists of lexer and recursive descent parser. The results shown in this research is implemented in. "rdnh", a private fork of Touhou Danmakufu ph3. The source code for both language interpreter and the generator is publicly available, and is possible to port it to other programming languages. The generated enemy patterns are evaluated by comparing various metrics against the benchmark stage, which is a recreated stage from a commercial SHMUP. It is found that the proposed generator can generate patterns in a short time, with variety and playability on-par with those from commercial SHMUPs game.
Other Abstract (Other language abstract of ETD)
งานวิจัยชิ้นนี้นำเสนอแบบโครงร่างในการสร้างแบบรูปศัตรูในเกมประเภทยานยิ่งแนว ตั้ง (SHMUPs) โดยใช้โครงสร้างที่มีพื้นฐานมาจากไวยกรณ์ที่ได้จากการสังเกตพฤติกรรมของ ศัตรูโนเกมยานยิ่งเชิงพาณิชย์ แล้วนำมาสร้างภาษาในการอธิบายแบบรูปคัตรูชื่อ "Enemy Pattern Description Language" (EPDL) ตัวภาษา EPDL สามารถเก็บข้อมูลที่เพียงพอกับการสร้างศัตรูโดยไม่จำเป็นต้องพึ่งข้อมูลจากภายนอก ตัวภาษาสามารถอ่านเข้าใจได้โดยมนุษย์ และสามารถนำไปใช้งานได้กับเอนจิ้นใดๆโดยใช้ตัวแปลภาษาที่เขียนขึ้น ตัวแปลภาษานั้นประกอบด้วย 2 ส่วนคือ ตัววิเคราะห์ศัพท์และตัวแจงส่วนแบบรีเคอร์ซีฟเตสเซนท์ (Recursive Descent) ผลลัพธ์ของงานวิจัยจัดทำในโปรแกรม rdhh ซึ่งเป็น ฟอร์กส่วนตัว (private fork) ของโปรแกรม Touhou Danmakufu ph3 รหัสต้นฉบับของตัวแปลภาษาและตัวสร้างแบบรูปคัตรูจะมีการเปิดเผยต่อสาธารณะและสามารถนำไปเขียนเป็นภาษาโปรแกรมอื่นๆได้ การประเมินแบบรูปของศัตรูที่สร้างขึ้นสามารถทำได้โดยการวิเคราะห์ข้อมูลเปรียบเทียบตัวชี้วัดต่างๆกับต่านตัวอย่าง ซึ่งเป็นต่านที่สร้างขึ้นเลียนแบบด่านในเกมยานยิงเชิงพาณิชย์ ซึ่งพบว่าชิ้นงานที่นำเสนอสามารถสร้างแบบรูปศัตรูได้ในเวลารวดเร็ว โดยมีความหลากหลายและคุณภาพในการเล่นเทียบเท่ากับเกมยานยิงเชิงพาณิชย์ได้
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-No Derivative Works 4.0 International License.
Recommended Citation
Kaweeratanakit, Nitit, "Context-free grammar framework for automatic shooting game enemy pattern generation" (2024). Chulalongkorn University Theses and Dissertations (Chula ETD). 11604.
https://digital.car.chula.ac.th/chulaetd/11604