Perhaps last entry, part #2: Crunch, GGC and aftermath

So the last weeks that has ensued has been quite extreme and somewhat painful, yet very rewarding. It has been way more intense than during the development of CoBots and while we may be commended for our vitality, having to resort to crunch-time is by no means a praiseworthy skill. It boils down to unforseen circumstances, underestimated scheduling, and for my part, procrastination and lack of motivation. In hindsight there is always room for improvement but we figured during the last week that we rather have a slice of what we ultimately want rather than an extremely polished but miniscule game. It is decided that Mechropolis is to stay a Work-In-Progress for now and that GGC is just another milestone to overcome before the inevitable release, however later it may be.

Occlusion culling bug

It should be noted that this blog post is unfinished and will probably remain so. I’m only publishing it for archive purposes. I have long since lost memory of what I was going to write and it the whole aftermath of GGC I was to tired to keep up with the writing. Hopefully it still provides some value and historical meaning, if not only for myself.

There is (was) a bug in the Unity version we used (4.3) which caused occlusion culling to cull objects (noticeably realtime lights) even when in plain sight. We pondered on this for quite the time, read up on forums and saw that this bug had been fixed but was not be released until a later (4.5) version. One of our teachers had access to a beta version which may or may not have fixed the problem, but could potentially create other unexpected behavior. Occlusion cullling is vital for performance, but not core gameplay and playability, so we had to assess whether to have it or not. Some days before GGC however, like a ray of light, Unity announced 4.5 with a multitude of fixes and improvements, one of which being the occlusion culling. For safety measures we parallell installed 4.5 alongside 4.3 (incidentally, there is no public 4.4 version). To our suprises it worked out quite well. I recall encountering a bug here and there but nothing major and game-breaking. The most annoying “improvement” was that the change from sorting alphanumerically to sorting by transform order in the hiearchy display. There is probably a deeper meaning to this and having the ability sort by transform order could prove meaningful, but as of now you have to write a custom script in order to retain alphanumerical sorting, which works but is a big minus.

Lightmapping/Asset Server problems

I have to say that for a $500 addon you would expect better support, stability and most importantly native functionality from such software. Unity’s Asset Server, which requires the Team License is without doubt very unsatisfactory in certain aspects, one of which is lightmaps. Lightmaps being a critical core functionality for stable game performance and visual aesthetics does not inherently work well with Unity source management. What is more cumbersome is that proper lightmaps requires hours of baking; work which can be lost in an instant because of poor asset management.

The problem lies in several factors. One is that lightmap changes are not properly detected by the Asset Server, thus reporting lightmaps as deleted or not reporting new lightmap files as new. Another problem, will could be a consequence of the prior is that lightmap indices for a scene becomes corrupt, that is objects are using the wrong parts of the lightmaps as their source, resulting in extremely visual and unpleasant artifacts. Ultimately, without a proper way to solve this, we opted to build lightmaps and build an executable on the machine which were to run the games at GGC. This works but limits the usage, tweaking and exporting to a single host for a given project, which is suboptimal. Another solution would perhaps be to use a third-party version control system, such as a Git server or Perforce.

Oh, and another, somewhat unrelated but interesting problem became apparent as part of the Windows/Unity integration. Unity’s Asset Server is run using a custom Windows user for unknown reasons (aptly named “unitysrv”) but you are given no control over this account whatsoever. A funny problem that occured was that Windows accounts, unless flagged for otherwise, requires you to reguarly change your password (once a month or something alike). When this requirement is pending and you try to start the Asset Server the operation simply fails without any indication of the cause; quite irritating. You probably should not change the password either as I suspect that the Unity Asset Server has a hardcoded password or that other unexpected behaviors would occur; instead you have to flag the account to not require regular password changes.

GGC

Gotland Game Conference turned out quite well. Our game was generally well recieved without major remarks more than what we already were aware of, such as more gameplay/levels and small fixes.

About Kenth Ljung

2012 Programming