Scriptable Objects have been around in Unity since 2012 with the release of Unity 4…wow that was a long time ago! Anyway these are pretty handy and I’m surprised by the amount of people I come across that either don’t know what they are, or how to use them.
So in the Minesweeper game I launched recently, one of the small challenges was finding a way to optimise the Flood-Fill(-esque) algorithm I was using to uncover empty tiles across the grid and to find every tile that has a mine and explode / reveal it from in a wave out from the last mine if the player has won or from the mine that has already exploded. Its Flood-Fill(-esque) because floodfill was used for the empty tile reveal but not really for the end of game mines showing. It is however close enough of a topic to bundle in. There were 3 methods that were created / recreated…one of which is definitely not how to do Flood-Fill in a performance critical portion of the game…
IMGUI (Immediate Mode GUI) is Unitys legacy UI system that handles game UI pre-Unity 4.6 and editor UI. It generally consts of GUI.xyz and GUILayout.xyz calls within an OnGUI function. It could get cumbersome and very difficult to read. Especially if you have a lot of GUI controls.
This is the 3 engine I’m building from scratch. The first was a 2D engine built in 2nd year at University and the second was built for my final year computing project. As there are less pressures and time restrictions on this one it should be more fully featured as well as more polished then its predecessors. I should also point out that this isn’t a how-to guide or tutorial. It is just my observations and whats been occurring as I’m progressing through.