New Level-Generation Method for a Single-Player 3D Game
摘要
Creating an endless level for single-player 3D games is a difficult task. The work examines the problems of level generation and proposes a method aimed at speeding up and reducing the cost of the process of developing game levels, revealing the approaches and technologies used to solve the problems of level generation, implementing algorithms for generating rooms and paths between them. After analyzing existing level generation methods, the BSP-tree generation method was selected, which can create unique levels based on input parameters, allowing to reduce the development time for game levels. To achieve the effect of an endless level, it is proposed to use the “scrolling” technique. This creates the illusion of infinity and allows the player to continue exploring new areas of the level. As a result, a level generation module for a single-player 3D game was designed, consisting of submodules (functions), each of which is responsible for generating a separate part of the level, has its own set of parameters that determine its behavior and output result, level generation can take place in real time or with using a pre-generated file. The module is flexible, allows you to add new parameters for level generation and has scalable code. When developing the architecture of the software solution, we chose the approach of dividing the code into separate components, each of which is responsible for a certain part of the level generation process, which made it possible to easily configure and change generation parameters, as well as modify the BSP algorithm to meet the specific requirements of the game.