Please use this identifier to cite or link to this item:
https://dspace.ctu.edu.vn/jspui/handle/123456789/127668| Title: | XÂY DỰNG TRÒ CHƠI 2D CHẠY VÔ TẬN SỬ DỤNG SINH BẢN ĐỒ THEO QUY TRÌNH |
| Other Titles: | DEVELOPING A 2D ENDLESS RUNNER GAME USING PROCEDURAL MAP GENERATION |
| Authors: | Huỳnh, Quang Nghi Nguyễn, Hoàng Duy |
| Keywords: | KỸ THUẬT PHẦN MỀM |
| Issue Date: | 2026 |
| Publisher: | Đại Học Cần Thơ |
| Abstract: | Bối cảnh: Ngành công nghiệp trò chơi điện tử đang phát triển mạnh mẽ và trở thành một lĩnh vực mũi nhọn trong công nghệ phần mềm. Trong đó, thể loại game 2D platform chạy vô tận (Infinite Runner) luôn giữ được sức hút nhờ lối chơi trực quan nhưng đòi hỏi sự tập trung cao độ. Tuy nhiên, thách thức lớn nhất của thể loại này là sự lặp lại của màn chơi, dễ gây nhàm chán nếu nội dung được thiết kế cố định. Việc ứng dụng các giải thuật sinh nội dung tự động (Procedural Generation) kết hợp với quản trị cơ sở dữ liệu quan hệ ngay trong môi trường trò chơi đang là một hướng nghiên cứu tiềm năng để nâng cao tính đa dạng và khả năng tái chơi. Mục tiêu: Đề tài hướng đến việc thiết kế và phát triển một trò chơi 2D chạy vô tận với khả năng tự động hóa cấu trúc môi trường. Mục tiêu chính là xây dựng một thuật toán điều phối độ khó linh hoạt, giúp mỗi phiên chơi mang tính mới mẻ và không trùng lặp. Đồng thời, đề tài tập trung vào việc hiện thực hóa hệ thống quản lý dữ liệu người dùng chuyên nghiệp bằng SQLite, cho 18 phép lưu trữ bền vững tiến trình chơi, các thiết lập cá nhân và bảng thành tích chi tiết, đáp ứng nhu cầu trải nghiệm lâu dài và tin cậy của người chơi trong mô hình game offline. Phương pháp: Trò chơi được phát triển trên công cụ Unity với ngôn ngữ lập trình C# theo mô hình hướng đối tượng. Hệ thống gameplay áp dụng giải thuật sinh bản đồ theo quy trình (Procedural Generation) dựa trên các ràng buộc về khoảng cách (Gap) và xác suất xuất hiện của vật thể (Traps, Enemies, Coins). Để quản lý dữ liệu, đề tài sử dụng thư viện SQLite kết hợp với kỹ thuật tuần tự hóa JSON (JSON Serialization) nhằm đóng gói các cấu trúc môi trường phức tạp vào cơ sở dữ liệu quan hệ. Kiến trúc phần mềm được tổ chức theo mẫu thiết kế Singleton thông qua lớp GameManager để điều phối tập trung toàn bộ trạng thái sống còn, điểm số và giao diện người dùng. Kết quả: Đề tài đã xây dựng thành công trò chơi 2D chạy vô tận hoàn chỉnh với cơ chế sinh bản đồ ngẫu nhiên có kiểm soát. Hệ thống đã hiện thực hóa khả năng lưu trữ và phục hồi môi trường chính xác từ Database, cho phép người chơi tiếp tục phiên chơi sau khi thoát ứng dụng. Kết quả thực nghiệm cho thấy giải thuật điều phối độ khó hoạt động ổn định, tạo ra sự cân bằng giữa tính thử thách và kỹ năng người chơi. Hệ thống lưu trữ SQLite đảm bảo tính toàn vẹn dữ liệu và tối ưu hóa tốc độ truy vấn hơn so với các phương pháp lưu trữ tệp tin thông thường. Kết luận: Việc kết hợp giải thuật sinh nội dung tự động và hệ quản trị cơ sở dữ liệu SQLite trong game 2D platform đã chứng minh hiệu quả vượt trội trong việc nâng cao tính chuyên nghiệp và giá trị giải trí của sản phẩm. Đề tài không chỉ đáp ứng các yêu cầu kỹ thuật về một sản phẩm game hoàn chỉnh mà còn khẳng định khả năng ứng dụng của các kỹ thuật quản lý dữ liệu hiện đại trong thiết kế trò chơi quy mô nhỏ, mở ra hướng phát triển cho các hệ thống game offline có chiều sâu về mặt kỹ thuật. Context: The video game industry is experiencing rapid growth and has emerged as a key sector in software engineering. Among various genres, 2D Infinite Runner games consistently maintain their popularity due to their intuitive yet demanding gameplay. However, the primary challenge of this genre is the repetition of game environments, which can lead to player fatigue if content is static. Integrating Procedural Content Generation (PCG) algorithms combined with relational database management within the game environment represents a significant research direction to enhance diversity and replayability. Objective: This project aims to design and develop a 2D Infinite Runner game featuring an automated environmental construction system. The main objective is to build a flexible difficulty orchestration algorithm that ensures each session provides a fresh and non-repetitive experience. Additionally, the project focuses on implementing a professional user data management system using SQLite, enabling the persistent storage of game progress, personal settings, and detailed achievement logs, thereby meeting the long-term engagement and reliability needs of players in an offline gaming model. Methodology: The game is developed using the Unity Engine and C# programming language following object-oriented principles. The gameplay system applies Procedural Generation 19 algorithms based on jump distance constraints (Gap) and object appearance probabilities (Traps, Enemies, Coins). For data management, the project utilizes the SQLite library in conjunction with JSON Serialization techniques to package complex environmental structures into a relational database. The software architecture is organized using the Singleton design pattern through a GameManager class to centrally coordinate game states, scoring, and user interfaces. Results: The project has successfully developed a complete 2D Infinite Runner game with a controlled random map generation mechanism. The system has realized the ability to accurately store and reconstruct game environments from the database, allowing players to resume their sessions after exiting the application. Experimental results show that the difficulty orchestration algorithm operates stably, creating a balance between challenge and player skill. The SQLite storage system ensures data integrity and optimizes query speeds compared to conventional file storage methods. Conclusion: The combination of procedural content generation algorithms and the SQLite database management system in a 2D platformer has proven highly effective in enhancing the professionalism and entertainment value of the product. The project not only fulfills the technical requirements of a comprehensive game product but also affirms the applicability of modern data management techniques in small-scale game design, opening up development directions for offline games with technical depth. |
| Description: | 211 Tr |
| URI: | https://dspace.ctu.edu.vn/jspui/handle/123456789/127668 |
| Appears in Collections: | Trường Công nghệ Thông tin & Truyền thông |
Files in This Item:
| File | Description | Size | Format | |
|---|---|---|---|---|
| _file_ Restricted Access | 7.6 MB | Adobe PDF | ||
| Your IP: 216.73.216.94 |
Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.