2 Dimensional Infinite Runner System

Hey Guys,

Currently putting together an infinite runner system that works both in the X and Y dimensions. Here’s a video of the first iteration.

[video]Unreal 4 Infinite Runner System - YouTube

I’m dynamically spawning a grid of floor tiles that move based off a master tile in the bottom left of the grid (they were originally moving independently of each, but irregularities in moving objects based on delta time forced me to do it this way). At the moment its just recycling tiles that passed and pushing them to the front of the grid, but I’m working on building an index of spawned tiles, so random ones can be selected and used without spawning them (not exactly sure what the overhead for instantiation is in UE4, but if its like any other engine I might as well implement this) Static Meshes are spawned when an tile is moved back to the front of the grid and attached at a random location on the tile. Using a Line Trace for the Z location to factor in any non flat tiles. At the moment it can take any number of tiles and Static Meshes and use them randomly. I’ve also got horizontal movement working as well for infinite movement in either direction. Future improvements will probably include creating systems to recycle static meshes and tiles more efficiently to minimize the number of actors being created and destroyed. What do you guys think? Someone already make something like this for unreal yet?

Update: System’s 95% finished, now with the capability of adding as many ground tiles and 3d meshes to propagate each tile as you want. Also built a system for making sure spawned meshes don’t overlap while maintaining 85 fps on my system. Here’s some screens of it.