Báo cáo chi tiết đồ án 1: Game Meow Knight (UIT - Nguyễn Tuấn Kiệt)

Báo cáo đồ án 1 game Meow Knight, thể loại 2D Rogue-lite bằng Godot Engine. Tài liệu trình bày thiết kế, use case, game loop cho sinh viên CNTT.

Chuyên ngành

Công Nghệ Phần Mềm

Người đăng

Ẩn danh

Thể loại

Báo Cáo Đồ Án

2022

54
0
0

Phí lưu trữ

30 Point

Tóm tắt

I. Giới thiệu về Báo cáo Đồ án Game Meow Knight

Báo cáo đồ án game Meow Knight là một dự án phần mềm toàn diện từ Trường Đại học Công nghệ Thông tin, Đại học Quốc gia Thành phố Hồ Chí Minh. Được thực hiện bởi sinh viên Nguyễn Tuấn Kiệt dưới sự hướng dẫn của giảng viên Trần Thị Hồng Yến, dự án này tập trung vào phát triển một game 2D Rogue-lite với đồ họa pixel độc đáo. Thời gian thực hiện kéo dài từ tháng 2 đến tháng 6 năm 2022, cho phép sinh viên áp dụng các kiến thức lập trình hướng đối tượng (OOP) và phân tích thiết kế hướng đối tượng (OOAD) vào thực tiễn phát triển game. Mục đích chính là kết hợp giữa việc nâng cao kỹ năng lập trình và tạo ra một sản phẩm game thú vị cho người chơi.

1.1. Mục đích và Mục tiêu Dự án

Dự án Meow Knight được thực hiện nhằm để sinh viên hiểu sâu hơn về lập trình hướng đối tượng và các design patterns. Mục tiêu chính là không chỉ cải thiện kỹ năng lập trình mà còn tạo ra một game hấp dẫn có khả năng tiếp cận rộng rãi. Qua việc phát triển game, sinh viên học được cách tổ chức code hiệu quả, quản lý các đối tượng game phức tạp, và áp dụng các nguyên tắc thiết kế phần mềm chuyên nghiệp vào môi trường Godot Engine.

1.2. Công nghệ và Công cụ Sử dụng

Godot Engine được lựa chọn làm nền tảng phát triển chính vì tính thân thiện với những lập trình viên mới bắt đầu và kiến trúc hướng đối tượng. Godot cung cấp các công cụ mạnh mẽ để tạo đồ họa 2D pixel, quản lý vòng lặp game, xử lý vật lý, và triển khai hệ thống AI cho các nhân vật. Sự lựa chọn này giúp sinh viên vừa có thể tập trung vào logic game vừa có thể học hỏi từ một engine chuyên nghiệp.

II. Đặc điểm Chính của Game Meow Knight

Game Meow Knight là một 2D Rogue-lite action game với những đặc điểm nổi bật riêng biệt. Thể loại Rogue-lite mang lại trải nghiệm chơi game đầy thách thức với hai nguyên tắc cốt lõi: Random Dungeon Generation (RDG)Permadeath. Game sử dụng đồ họa pixel ấn tượng kết hợp với gameplay hành động sôi động, tạo nên một sản phẩm độc đáo. Cấu trúc game được thiết kế để cân bằng giữa tính ngẫu nhiên và flow của trò chơi, đảm bảo mỗi lần chơi đều mang lại trải nghiệm khác biệt nhưng vẫn công bằng và hấp dẫn với người chơi.

2.1. Hệ thống Sinh Ngẫu nhiên Dungeon

Random Dungeon Generation trong Meow Knight được triển khai thông qua kỹ thuật pre-creating nhiều bản đồ sẵn có thay vì sử dụng thuật toán sinh động. Các bản đồ được sắp xếp ngẫu nhiên, kẻ thù xuất hiện tại các vị trí ngẫu nhiên, và kho báu được phân phối một cách bất định. Phương pháp này giúp duy trì cân bằng game trong khi vẫn cung cấp tính tái chơi caotrải nghiệm mới cho người chơi ở mỗi lần bắt đầu game mới.

2.2. Cơ chế Permadeath và Thách thức Game

Permadeath là yếu tố hình phạt cốt yếu trong game, buộc người chơi phải cẩn thận trong mỗi quyết định. Khi nhân vật bị đánh bại, tất cả tiến độ sẽ bị xóa sạch bất kể đã tiến đến đâu. Mục tiêu cuối cùng của Meow Knight là người chơi phải vượt qua tất cả các thách thức để đánh bại Boss cuối cùng. Cơ chế này tạo ra căng thẳnghứng thú cao khi chơi game.

III. Thiết kế và Cấu trúc Hệ thống Game

Thiết kế hệ thống Meow Knight được xây dựng dựa trên các nguyên tắc Object-Oriented Design với các thành phần chính gồm: Core Game Loop, Use Case Models, Data Design, và Interface Design. Báo cáo đồ án bao gồm chi tiết về vòng lặp game chính, các sơ đồ use case cho từng thực thể trong game từ Player, các loại Enemy (Blue Slime, Orange Slime, Green Frog, Blue Frog, One-Eye Bat, Slime Knight, Frog Wizard, Bad Bat) cho đến Boss chính Meow Knight. Mỗi thành phần được mô hình hóa rõ ràng để đảm bảo tính toàn vẹn và dễ bảo trì của hệ thống.

3.1. Vòng Lặp Game và Luồng Xử lý Chính

Core Game Loop là trái tim của Meow Knight, xử lý việc cập nhật trạng thái game, render đồ họa, và xử lý input từ người chơi. Vòng lặp này được lặp lại liên tục để tạo ra trảm chiếc. Nó quản lý sự tương tác giữa Player và các Enemy, xử lý va chạm, cập nhật HP/MP, và kiểm tra điều kiện thắng/thua. Thiết kế tốt của Game Loop đảm bảo game chạy mượt mà, phản ứng nhanh với người chơi, và cải thiện trải nghiệm chơi game tổng thể.

3.2. Thiết kế Giao diện và Hệ thống UI

Interface Design của Meow Knight bao gồm nhiều thành phần UI quan trọng như Title Screen, Main Menu, Status UI (hiển thị HP & MP), Coins Counter, Shop Window, và Confirm Dialog. Mỗi UI được thiết kế để cung cấp thông tin rõ ràngdễ sử dụng cho người chơi. Hệ thống giao diện tích hợp được thiết kế để hỗ trợ người chơi theo dõi trạng thái nhân vật, quản lý mua bán vật phẩm, và điều hướng các menu game một cách trực quan và hiệu quả.

IV. Kết luận và Ý nghĩa Đồ án

Báo cáo đồ án Meow Knight đại diện cho một nỗ lực toàn diện trong việc áp dụng các kiến thức lập trình chuyên nghiệp vào phát triển game thực tế. Dự án này không chỉ cho phép sinh viên thực hành lập trình hướng đối tượng mà còn hiểu được quy trình phát triển phần mềm từ A đến Z, từ phân tích yêu cầu, thiết kế, lập trình, cho đến kiểm thử. Tất cả tài nguyên trong game được sử dụng với sự cho phép hoặc được tạo bởi tác giả, với các ghi công chi tiết được liệt kê trong game. Dự án này có thể được mở rộng thêm trong Đồ án 2Luận văn tốt nghiệp với các tính năng phức tạp hơn.

4.1. Những Kỹ năng Đạt được Qua Dự án

Thông qua việc phát triển Meow Knight, sinh viên đã tiếp cận được design patterns, architecture patterns, quản lý state management, xử lý collision detection, và tối ưu performance trong Godot. Ngoài ra, dự án cũng giúp sinh viên hiểu rõ về cycle life của object, inheritance, polymorphism, và cách tổ chức code một cách chuyên nghiệp. Các kỹ năng này là nền tảng quan trọng cho sự phát triển sự nghiệp trong lĩnh vực phát triển game và phần mềm.

4.2. Hướng Phát triển Tương lai

Dự án Meow Knight có tiềm năng phát triển cao hơn với việc bổ sung các tính năng mới như multiplayer mode, advanced AI, procedural generation, và mobile optimization. Sinh viên có thể sử dụng trải nghiệm từ dự án này để tiến hành Đồ án 2 với scope lớn hơn và Luận văn tốt nghiệp với các nghiên cứu sâu hơn. Sự lặp lại và cải tiến liên tục sẽ giúp tạo ra một sản phẩm game chuyên nghiệp và có chất lượng cao.

28/12/2025

Trích đoạn nội dung tài liệu

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINH TRƯỜNG ĐẠI HỌC CÔNG NGHỆ THÔNG TIN KHOA CÔNG NGHỆ PHẦN MỀM BÁO CÁO ĐỒ ÁN 1 ĐỀ TÀI: MEOW KNIGHT Giảng viên: Trần Thị Hồng Yến Sinh viên thực hiện: Nguyễn Tuấn Kiệt Thành phố Hồ Chí Minh, năm 2022 1 VIETNAM NATIONAL UNIVERSITY - HO CHI MINH CITY UNIVERSITY OF INFORMATION TECHNOLOGY THE FACULTY OF SOFTWARE ENGINEERING PROJECT 1 REPORT PROJECT: MEOW KNIGHT Instructor: Trần Thị Hồng Yến Student: Nguyễn Tuấn Kiệt Hồ Chí Minh, year 2022 2 Document change record sheet Date Version Description Authors 20/12/2022 1.0 Nguyễn Tuấn Kiệt Disclaimer: All of the resources in game are free for commercial usages, or, drawn by myself. Every credits have been listed in Credit Section (this document), in Credit File (the game folder) and in Credit Board (in game). 3 Table of Contents Table of Contents. 4 Images Table of Content.

Statement Of The Project. Brief About Entities And Objects In Game. Non-functional Requirements. 19 Chapter II: Use Case.

Use Case Models. 21 Chapter III: Data Design. 43 Chapter IV: Structural Design. Core Game Loop:.

44 Chapter V: Interface Design. List Of UIs:. 46 Chapter VI: Installation. 52 Chapter VII: Conclusion.

54 5 Images Table of Content Image 1: Godot. 14 Image 3: Player Use Case Diagram. 21 Image 4: Blue Slime Use Case Diagram. 22 Image 5: Orange Slime Use Case Diagram.

22 Image 6: Green Frog Use Case Diagram. 23 Image 7: Blue Frog Use Case Diagram. 23 Image 8: One-Eye Bat Use Case Diagram. 24 Image 9: Slime Knight Use Case Diagram.

24 Image 10: Frog Wizard Use Case Diagram. 25 Image 11: Bad Bat Use Case Diagram. 25 Image 12: The Meow Knight Use Case Diagram. 26 Image 13: Core Game Loop.

44 Image 14: Title Screen. 46 Image 15: Status UI - HP & MP. 47 Image 16: Coins Counter. 47 Image 17: Main Menu.

49 Image 19: Shop Window. 50 Image 20: Confirm Dialog Window. 51 6 Acknowledgement Have been studying and training in University of Information Technology – Hồ Chí Minh City as a Software Engineering student, I now have the fundamental knowledge and practical abilities needed to attend Project 1. I would like to offer my sincere appreciation to those who made it possible to complete this course: To University of Information Technology.

This is where I created my base programming skills. Without taking part in our university, I wouldn’t have a chance to pursue my passion. Without your enthusiastic help and guidances, the development would not process as I had planned. To Juan Linietsky, Ariel Manzur and Godot Community.

Studying and using Godot is one of my best experience in my “game dev” lifetime. Thanks you for creating a tool that can make any imagination possible. And finally, to my family, my love, all the teachers and staffs in the university, my friends. You are my reasons to keep working.

In the process of doing Project 1, I will have unavoidable mistakes. Therefore, it would be so grateful for me if I can receive guidances, suggestions and advices from everyone. That will be my inventories to improve and develop myself to take part in Project 2 as well as the Graduation Thesis. I am sincerely appreciated.

Wish the best of luck will always accompany you all. Hồ Chí Minh City 01/11/2022 Kiệt Nguyễn Tuấn Kiệt 7 Detailed Outline PROJECT NAME: 2D ROUGE-LITE GAME. Trần Thị Hồng Yến. Implementation time: From 21/02/22 To 18/6/2022 Students: Nguyễn Tuấn Kiệt – 20520906.

Purpose of the project: Before taking part in this course, I have studied about Object-Oriented Progamming (OOP) and Object-Oriented Analysis & Design (OOAD). I also have a chance to be aware of the design patterns like singletone pattern. At that moment, I have known that developing is not just limited at coding. To put my knowledge into practice, I decide to make an application, or more specifically, to make a game – my the most favorite hobby.

A game is a collection of different objects – which will help me improve my idea about Object-Oriented. I would like to use Godot Engine for this project, since it is designed to be friendly with amateurs and Object-Oriented-like. In conclusion, I do not only want to improve my skills after this course but also want to create a fun game that has wide-range of players. About game: - The game’s main genre is Action with 2D Pixel Graphics and gameplay of Rogue-Lite.

- As a Rouge-Lite game, we will have two main principles to follow: Random Dungeon Generation (RDG) and Permadeath. 8 - Random Dungeon Generation is when players have various experience each time they start a new game. The maps’ order will be randomly placed, random enemies spawn at the areas, random treasures,… However, to keep the game’s flow and balance in control, I will use a technique that pre-creating a lot of maps instead of using algorithm to draw the maps. - Permadeath is the punishment to our players.

If player gets defeated – no matters how far they have gone, all of the process will be vanished. - The main purpose of the game is to beat the Final Boss at the 13rd floor. Therefore, the game will have 13 floors in total, gifts in 4th, 8th and 12nd floors 3. Scoop - Environmental Scope: Windows 7 or later/ On Web through Itch.

- Player Scope: Everyone. (Based on ESRB) - Features Scope: • Player can move left & right, attack, jump, roll and learn new abilities during game flow. • Abilities earned during a run will disappear when player was defeated. • Defeated causes player random negative effect.

• Player can collect golds by passing a floor or breaking boxes. • Gold can be used to upgrade player, buy items or cure negative effect. • The maxium slots of inventory is 3. Start at 1 and can be expanded through shop.

• Enter the tower (game) costs gold. • The entrance fee increases proportional with numbers of defeats. • Enemies have different behaviors. • There are enemies floors and traps floors.

• Beat all enemies to pass enemies floors. 9 • Collect key to pass traps floors. • Gifts (skills/abilities) can be learned (randomly) at floor 4 – 8 – 12. • Random Bosses at 4 – 8 – 12.

• Final Boss at 13. • Player turns into invincible state when taking damage. • Having some basic configurations. Implementation - Working online with instructor during the course.

- Learning GDScript and Godot for game developing. - Researching about game design to understand in depth about how a game functions. - Version Control through Github. - Using Google Docs and Microsoft Word/Excel for reports and documents.io for diagrams.

Developing platforms and environments - Platforms: Windows 10. - Programming Language: GDScript. - UML Tools: Draw. Expected result - The game runs without bugs.

(Not impossible to finish the game) - Collisions are well handled. Work plan Implementing time: 4 months. Phase 1 – 1 month - Design core game mechanics, basic gameplays, required traps and enemies. - Create/Find resources for game, including: graphics, audios.

- Building the base game (first prototype) containing all of the elements that have been planned. - Implementing auto-save system. Phase 2 – 1 month - Randomizer design. - Levels design: create various maps for the randomizer.

- Abilities, negative effects, items design. Phase 3 – 1 month - Bosses design. Phase 4 – 1 month - Debug. Group Information Student ID Name Email 20520906 Nguyễn Tuấn Kiệt 20520906@gm.

Project Information • Project name: Rogue-Lite Game. • Game name: Meow Knight. • Game development environment: Windows 10.1 Godot Image 1: Godot Godot is a cross-platform, free and open-source game engine released under the MIT license. It was initially developed by Argentine software 12 developers Juan Linietsky and Ariel Manzur for several companies in Latin America prior to its public release.

The development environment runs on multiple operating systems including Linux, BSDs, macOS, and Microsoft Windows. It is designed to create both 2D and 3D games targeting PC, mobile, and web platforms. It can also be used to create non game software, including editors. Godot aims to offer a fully integrated game development environment.

It allows developers to create a game, needing no other tools beyond those used for content creation (visual assets, music, etc. The engine's architecture is built around the concept of a tree of "nodes". Nodes are organized inside of "scenes", which are reusable, instanceable, inheritable, and nestable groups of nodes. All game resources, including scripts and graphical assets, are saved as part of the computer's file system (rather than in a database).

This storage solution is intended to facilitate collaboration between game development teams using software version control systems.2 GDScript Godot has its own built-in scripting language, GDScript, a high-level, dynamically typed programming language which is syntactically similar to Python. Unlike Python, GDScript is optimized for Godot's scene-based architecture and can specify strict typing of variables. Godot's developers have stated that many alternative third-party scripting languages such as Lua, Python, and Squirrel were tested before deciding that using a custom language allowed for superior optimization and editor integration.0, a new feature called Typed array was implemented on GDScript. This allows users to easily change a regular array to typed and vice-versa without changing much code.3 GitHub Image 2: GitHub GitHub is an Internet hosting service for software development and version control using Git.

It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, continuous integration, and wikis for every project. Headquartered in California, it has been a subsidiary of Microsoft since 2018. It is commonly used to host open source software development projects. As of June 2022, GitHub reported having over 83 million developers and more than 200 million repositories, including at least 28 million public repositories.

It is the largest source code host as of November 2021. Statement Of The Project 1. Story Every hundred years, the Demon King will be revived once again. To protect the peace of The Meows Kingdom, The Table of Kitty Cantty Wizards annually hold the Knight Exam to find the chosen one that can defeat the whole world threat.

You are a brave Meow that persueing a mighty dream. Enter the tower built by Wizards, you need to defeat all illusions, conquer the final floor to be the greatest knight in this chaos age. Brief About Entities And Objects In Game 2.1 Player - The Game Object that we control based on rules of the game. - Player can do all of the things that were mentioned in the feature section above.2 Normal Slime (Blue Slime) - Normal Slime is basically harmless.

It doesn’t have detection range; therefore, it won’t charge or attack Player. - Normal Slime has basic stats, but still dangerous if they are in groups.3 Orange Slime (Ground Slime) - Orange Slime has really wide Range but low Health. - It will jump into the ground and attack Player and your position. - Player has a while to dodge the attack but it could be really annoyed when you are surrouned by traps.4 Green Frog (Ranged Attack Frog) - Green Frog doesn’t move, it shoots bullets.

- It will roll back when getting hit. - It is easy to dodge its bullet, but it is tough to dodge its bullets.5 Blue Frog (Melee Attack Frog) - Blue Frog is aggressive. It will seek and charge player whenever you enter its detection area. 15 - Blue Frog jumps to move which is more difficult to predict its movements.

- Blue Frog needs to rest a little bit between jumps.6 One-Eye Bat (Fly Enemy) - It flys towards Player whenever you enter its region.

Nội dung được bảo vệ bản quyền — Tải xuống đầy đủ