Infinite Runner Prefab Cycling

In one of our levels in White Paw, we have a train that’s constantly in motion. This is similar to how an infinite runner might work at least conceptually. Your perpetually going forward. There are usually only 2 real ways of dealing with this, have the player fixed to the world origin (0,0,0) or move the whole scene back to the origin after a certain point. Both of these are to prevent floating point inaccuracies (FPIs) the further out of the scene you go. A great example of this problem can be seen in (this) post.

Continue reading “Infinite Runner Prefab Cycling”

Auto Save for Unity

I was teaching one of my training courses when one of the students Unity Editors’ crashed and they lost a fair bit of work. It was at that point I thought, hmm…there really aught to be a form of an auto save system for Unity. I mean Unreal Engine 4 has it after all. I looked at what was available and there is a script on the Unity Wiki that does it, but I felt like it wasn’t flexible enough. So I sat down one evening and decided to actually make it. I surely would benefit more people than just my students and myself I would hope.

Continue reading “Auto Save for Unity”

Flood-Fill(-Esque) algorithm on a 2D grid

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…

Continue reading “Flood-Fill(-Esque) algorithm on a 2D grid”