World Shifters

In order to make the terrain shift to create various effects I had to devise a versatile system that could allow me to create a variety of world shifters easily. As these world shifters have to communicate with the world manager in order to affect the world I devised a base class that maintains all of the core functionality that it shared between all world shifters. However I left a series of functions virtual in case some unique functionality needed to be defined. Though I could create a world shifter by simply defining a single function called ‘find stacks’ that determines how this world shifter finds the stacks within the world manager that it effects.

Using this system I created a series of world shifters that included a pulse shifter, point shifter, volume shifter, sphere shifter, and array shifter. Below is a video being filled in a demo space that demonstrates some of these shifters.

A few optimisations had to be made for these shifters. The most major implementation was a frozen option that states that the current world shifter does not move when active. This means that I do not have to waste every fixed update frame re-finding stacks, which allowed for the creation of much larger world shifters.

The final effects for the game worked really well. Using these world shifters we were able to create a variety of mechanics that helps win the Microsoft UK Imagine Cup. Below is a demo video that demonstrates how some of the world shifters were used to create a variety of mechanics.

The code for the world shifter system can be downloaded from the code listing page under the Hex World project files. These files are located within Assets >> Scripts >> World Shifting.