Sunset is by far the most complicated thing we’ve created in Unity. When we made our first Unity game, The Graveyard, we quickly realized that the tool was only going to be useful to us for making simple games. We came from the grand luxury of realtime visual programming offered by Quest3D with which we, artists and programming idiots, had built a multiplayer online game (The Endless Forest) and a horror game with semi-autonomous characters (The Path). The fact that Unity only offered script-based programming immediately meant that we had to dial down our ambitions. Our artist minds can perform magic with visuals but code makes our brains hurt. And compiling is the death knell for realtime creativity.
Luckily in the mean time, the problem has been alleviated somewhat by Unity add-ons that at least offer the possibility to program visually (although realtime non-compiled programming is still not possible to my knowledge). Bientôt l’été was programmed with Antares Universe and then recoded in Javascript for performance. Luxuria Superbia ditto. Since we didn’t like having to recode things, we decided to give PlayMaker a chance when we started programming our first prototypes of Sunset.
In the end we used a combination of PlayMaker FSMs, Javascript and C sharp code to make the whole thing run. Code looks infinitely boring and is hard to read but PlayMaker’s Finite State Machines make programming clear and fun. And the fact that it doesn’t need to check whether we put all our semicolons in the right places or didn’t misspell something means it’s a lot faster to work with (Unity’s recompiling of scripts each and every time you make the slightest change is quite unnerving in a big project like Sunset).
Spoilers!
So here’s some of the state machines that make Sunset tick.













I love how visual programming gives me an overview of the logic that helps me decide whether it is correct. Maybe it’s superstition but when a graph looks pretty I think the logic runs better. A good looking state machine cannot have bugs.
Obviously some of the things above would be faster to program in code. If you know what you want before you start. And if you can keep a big game like Sunset in your head. But when experimenting or just forgetting about certain things, to me these graphical representations are much easier to read and much “lighter on the brain”. The excessiveness of some of the graphs helps me think about the logic. And the fact that you simply cannot make any typos in PlayMaker is a huge time saver. Now if they would only add realtime programming to Unity…
— Michaël Samyn.