When it came to programming the world tiles I had to make sure that I could create vastly unique behaviour from tile to tile.
One of the ways I ensured this was my making use of C# interface classes. By making interface classes that could be identified within certain systems. These systems can be read about by following the link below.
These systems allow me to set up specific forms of interaction. For example the mine tile can be triggered by being stood on or by being triggered by a switch tile. Or having grass tiles being destroyed by explosions, while stone tiles only get indented. An example of these can be seen within this old demonstration video.
Below are the behaviours of a series of tiles that have so far been created for Hex World. New tiles are persistently being added when needed.
Grass Tile – Can be destroyed and slightly indent when an item or player is standing on them.
Stone Tile – Indestructible but form temporary craters when explosions occur on them.
Jump Pad Tile – launch objects and players into the air.
Mine Tile – Explodes when stepped on or when triggered by a switch.
Hover Tile – Temporarily hovers above the ground.
Turret Tile – Launches projectiles out from its sides.
Spike Trap Tiles – Can eject and retract a series of spikes from its top and sides.
Pressure Switch Tile – When stepped on can send signals to objects with the switch receiver interface.
The code for these world tiles can be downloaded from the code listing page under the Hex World project files. These files are located within Assets >> Scripts >> World Tiles.