Christoph Kümper

Starship

Starship was created for the lecture “Gameplay Programming”. The goal was to create a prototype during the lecture. We created an endless space shooter. The main focus was the procedural level generation. Because the engine we should use for the prototype was still in an early state it was not possible to destroy objects. That’s why we needed to reuse all objects. I was responsible for the most programming stuff of the game. Everything is implemented with lua.

Procedural Level Generation

 

Because it was not possible to destroy objects we needed another performant solution. Therefore we spawn at the beginning a fixed number of tiles. Each of these tiles has a fixed number of buildings. Before we set the position of the buildings we random the amount how many buildings are shown on the tile. To set the position for the buildings we used a grid. Each area of this grid can contain a building. To find the position for the a building we random the x and y value.  Some rules for example were added that not two buildings can't stand in the same area. Another rule prevent that a building cant have a direct neighbor on y axis.  If one of these rules get violated the position for the building will be randomed again.

Each difficulty stage has a minimum and maximum amount of buildings. If a building is not used it will be moved under the tile. To simulate the moving of the ship the tiles are moved toward the ship. If the tile is behind the ship it will be moved to the end of the queue and the amount and position of the buildings will be randomed again.

If you have any questions or want to have access to the repository contact me