Spare time project, using Unreal Engine.
In this prototype, the goal is to run as far as possible, without colliding with obstacles.
The level assets are procedurally generated as the player progresses.
First, the three possible spawn points (SpawnLeft, SpawnCenter and SpawnRight) are defined through the “Set Spawn Point” script. Then, spawnable obstacle meshes are defined through the “Set Obstacles” script. And lastly, a function calling one of the obstacle meshes to spawn at one of the spawn points.
At the start of the game session, a row of map tiles are created to meet a defined desired amount to begin with.
As the player moves forward and overlaps an “End Trigger” box, the triggered map tile is removed from the level, while a new one is created at the opposite end of the row of map tiles.
Player Movement:
The player character is always moving forward and is only allowed to move left or right.
Game Over & Score Count:
When the player collides with an obstacle, the meter count stops, and the character gets knocked down. The level is reloaded and the meter count is reset to 0.