Total Eclipse

Game Development & Consulting

From our blog

Unity Port for A Clockwork Brain – DevLog #4

A Clockwork Brain DevLog 4Week 13/10 – 19/10

Hey all!

Another week gone, another mini-game complete!

During last week we finished Word Length, which also happens to be one of my favourite mini-games, although I can never seem to reach the Insane Round. Besides porting the game to Unity, we also made some usability improvements, compared to its current version on iOS, which should now make it a lot more intuitive for the players to understand which button they pressed.

Furthermore, we started working on the last game, What Has Changed. Being one the most complex mini-games, it should take us longer than average to port, but we expect it to be completed sometime this week.

Work on the supporting server backend and game peripherals is also progressing well. Last week our engineers focused on implementing parsers for communicating with the server,  as well as designing an offline mode that can substitute the server when there is no active Internet connection. This works by implementing any domain rules locally and reading responses from local storage. In addition, we worked on the architecture for supporting multi-platform leaderboards and achievements.

On other issues, I have been working towards a quasi-solution for Unity’s horrible non-dither support for RGBA444 textures with transparency. You can read more about this issue at my dedicated forum question, but the <tl;dr> version is: Unity does not apply a dithering algorithm when compressing textures to RGBA16, making any sprite with even a hint of gradient, look completely horrible.

Since I could not find a way to add a new compression option to the Unity pipeline (for example ARGB 16 with Floyd-Steinberg), I now use the following technique, which gives better results than the Unity default compression:

  1. Re-export all Atlases with transparency to RGBA 4444 with Floyd-Steinberg Alpha from Texture Packer. This is a breeze with Texture Packer command line.
  2. Import them as usual to Unity.
  3. Change compression settings for those textures to RGBA16.
  4. Unity applies its own ‘compression’ but since the image is already dithered, Unity’s compression does not do as much damage.
  5. Build to device as usual, without glaringly horrible gradients. Even our picky and pixel-hunting Art Director is happy with this solution!

Here is a screenshot comparing the different approaches, so that you can see what our quasi-solution is achieving.Unity RGBA444 Dither

Hopefully Unity will deign to give us a dither option in future versions, or at least allow us to roll our own…

Stay tuned for next week! Until then, why don’t you tell us in the comments below what your favourite mini-game in A Clockwork Brain is?

Maria

Leave a Reply

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