Tribloos 3 – Development Diary 1

The Tribloos 3 Development Diary
Welcome to the first in a series of development diary updates regarding our upcoming title The Tribloos 3.

I completely failed to write one for Tribloos 2 and I really regret it. Therefore I’ve decided to start up this up for the third game for anyone interested enough to read my hopes and frustrations while making the game!

So first off I’m actually writing this at the start of February 2015! I’m hoping to surprise any Tribloo fans with a trailer I’ve been working on in top secret. With any luck that came out recently and fans of the series are terribly excited. I decided to start writing these entries early so I had enough material to keep posting when I’m likely in the latter, slightly more consistent stages of polishing.

[2016 edit: “oops, not there with a trailer yet! Stay tuned…”]

But I’m excited today because I’ve finished the first iteration of the path-finding code I’m going to use in the game and especially pleased that it’s performance is so good!

But first lets re-wind a little. As always I want the game to be playable on any PC/Mac spanning the last 7/8 years (the long term life-span of any decent machine). On the other hand I wanted to push the boundaries of the game past what was possible in the first and second games. This means several things, starting with resolution. The Tribloos 3 will be In Full HD but will be playable on pretty much any resolution using standard scaling techniques. This resolution change means I’ve been able to up the overall detail level of the in-game graphics by 50% and also fit more on the screen at the same time!

However this is not the only improvement I want to mention in this Development Diary. Game-play has always the center focus of The Tribloos and expanding what’s possible in the engine has been my major focus. This is especially true in the planning and early development stages, before I code myself into a corner and can’t expand easily. (It’s kind of like using all your wood before you built your sawmill).

The screenshot I’ve attached below shows an early version of the game (I mean, seriously early). I’m not sure if anyone noticed in the second game but when you came across the zip-wires in the sky temple levels you only ever had *2* maximum. This was a limit that always bothered me and the pathfinding code was a bit of a mess by the time I’d finished.

An Early Picture Of  Tribloos 3
An Early Picture Of Tribloos 3

So this time I approached the idea of path-finding with a generic approach to “shortcuts”. The theory being that a level could have any number of zipwires and would be clever enough to figure out which combination of shortcuts would form the quickest route. Or if the shortcuts help at all!

The trick here was mainly producing a list of the shortcut combinations. I had to find some clever code on the internet to produce this list really quickly so as not to slow down the actual A* path-finding code to generate the paths between the shortcuts. I won’t bore you with the technical details of the code but it involved an operation called bitShiftLeft which I’ve rarely used before! (Some seasoned coders are likely to chuckle at me there).

Anyway the upshot is that the level in the screenshot can produce a route in under 3 milliseconds on a single core of my machine. As I’m aiming for 60-30 fps again this should just about do. I’m a delta time advocate rather than fixed rate timing so even if this pushes a cycle a little over my target 16ms this should be hardly noticeable.

Getting back to game-play: I wanted to specifically mention in this development diary entry that the reason I went with a more generic approach of “shortcut” is so the game can have more than just Zip Wires! I have other quick ways of getting through the level planned. I want to mix up the usual thinking patterns of where workers can get to and vary the level layouts even more than previously seen. Separating the areas you can access in the early stages of a level means more options for workers. More options for workers means more ways to try and shave those seconds off your final time!


Exciting stuff I reckon! I hope you’ve enjoyed reading about my adventures with pathfinding for The Tribloos 3 and I hope you’re looking forward to it’s release on BigFishGames in the future. Let me know if you have any questions about the pathfinding system in this game and don’t forget to subscribe to our monthly newsletter!

Leave a Reply

Your email address will not be published. Required fields are marked *