• Register

TinyKeep is an upcoming action roguelike game with procedurally generated dungeons, emergent monsters, deadly traps and mysterious secrets.

Post news Report RSS UI implementation in Unity

Wrestling with all the different 3rd party UI alternatives for Unity. UniSWF seems to be the best fit for TinyKeep combining good platform support, workflow and feature set.

Posted by on

At the end of October I'll be sending our first build to the monthly focus group users. These are a few "lucky" people who for some reason decided to give me a lot of money just for the privilege of finding bugs! Just kidding, you guys and girls will get to test and be involved in the gameplay decisions nice and early :)

As part of this first release I wanted to focus a bit on cleaning up the UI so that it's a little more polished to look at. The work I'm doing will also help me get a handle on the different UI solutions available for Unity, which will form the foundation of all the UI work in the future.

Unity GUI
If you've ever used Unity, you'll know that the default UI system that comes with it is plagued with a whole host of performance and usability problems. I won't say anything further about the subject, there are plenty of complaints on this thread:
Forum.unity3d.com

As an ex-Flash/ActionScript developer I leaned towards a few different 3rd party UI alternatives: Noesis, Autodesk's Scaleform and UniSWF.

Noesis
Noesis uses XAML, an XML based templating system from Microsoft's Silverlight and looks extremely polished however it lacked Linux support.

Scaleform
Autodesk Scaleform looked like the best of the bunch, supporting a full AS3 virtual machine and pretty much the entire Flash feature set. However, it is extremely expensive (you have to purchase a license for each of the platforms you intend to export for) and also there is currently no Linux support.

UniSWF
Considering I had promised my Kickstarter backers Windows, Mac and Linux support for the game, I ended up going with UniSWF. A nice and light framework that can automatically take a Flash file (.fla) and convert it into a format ready to use in Unity. Unlike Scaleform, AS3 isn't supported as there is no virtual machine, so all the logic has to be coded in Unity (C# is my preference). Not a big deal, but there are other drawbacks too such as the lack of 9-slice scaling, masks and blend modes. The pricing is good though, and Linux is supported out of the box as it uses Unity's rendering system just like any other scene object. All sprites are exported in a single texture atlas which helps reduce the amount of draw calls too.

Given these limitations I was still able to implement a robust enough system for my needs.


The buttons and parchment can be 9-slice scaled, which I had to implement manually in code as UniSwf doesn't support it.


Implemented a few different controls such as dropdown menu, text inputs etc...


Quite nice to see progress bars integrated with the dungeon generation work I've been doing for the past few months!


A non-UI screenshot just for fun, some monsters have self-illuminated heads such as this glowing imp. I like the lighting on this one! Smiley

Next week I need to get the HUD up and running for the first gameplay test!

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
TinyKeep
Platforms
Windows, Mac, Linux
Developer
Phigames UK
Engine
Unity
Contact
Send Message
Homepage
Tinykeep.com
Release date
Game watch
Follow
News
Browse
News
New
Post news
Report
Report
Share
Related Games
TinyKeep
TinyKeep Roguelike
Related Engines
Unity
Unity Commercial