Search Unity

Weighing in on Scaleform Integration

Discussion in 'General Discussion' started by Cosmas, Aug 5, 2012.

  1. Cosmas

    Cosmas

    Joined:
    Jan 9, 2010
    Posts:
    133
    I wanted to start a thread to get some feedback from those of you that were using either the eval or the licensed version of the Scaleform plugin. I know it hasn't been that long out yet but I wanted to hear some general thoughts about what some of you think of it.

    I've got some extra capital right now and I'm debating buying the plugin over simply waiting for U4's GUI which looks to deliver a much faster interface. My project is held up right now because I'm not satisfied with the current menu system and I've tried both NGUI/ezGUI and I don't really like either. I know I want good scalable vector graphics for my UI but the thing I'm not liking about the Scaleform eval is the sheer amount of code you have to write just to get some basic button functionality.

    What are your thoughts? and thanks in advance.
     
  2. Cosmas

    Cosmas

    Joined:
    Jan 9, 2010
    Posts:
    133
    Anybody? No?
     
  3. MatthewDoyle

    MatthewDoyle

    Joined:
    Jul 13, 2012
    Posts:
    13
    Actually, Scaleform provides a UI widget framework called CLIK, which allows you to drag and drop common UI components onto your Flash file, and add functionality with just a few lines of ActionScript, LUA, or C#.
     
  4. agentleo

    agentleo

    Joined:
    Jan 2, 2011
    Posts:
    56
    I have only been evaluating the integration for a little under a week , but I like so far what I see. It has a few draw backs as currently explain in documention such as only drawing to the main buffer, but this functionality will be added in later updates. I am pretty sure I will be buying plugin at the end of the month. I am sure new guy system will be improved in 4.0 but I doubt it will come close to Scaleform.
     
  5. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Do you mean, we can create buttons (and any kind of UI object) only using scaleform (not Flash)?
    Can you explain a little bit more about CLICK?
     
  6. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    This is based on my experiences so other people may have different perspectives but...

    I've used Scaleform in two large-scale game projects. We had one dedicated UI artist and two dedicated UI coders and it was still a productivity-sucking nightmare. Flash was not made for games. The Flash -> Scaleform -> Your Engine pipeline was definitely not made for small teams or low-power devices. We won't know for sure until it's released but the teaser that UT released for the new GUI system looks waaaaaaaaaaaaaaaaaay more impressive than Scaleform.
     
  7. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Where is that Teaser? :D
     
  8. NoBullIntentions_P

    NoBullIntentions_P

    Joined:
    Jul 2, 2012
    Posts:
    311
    I wouldn't go *that* far, but I do agree that it looks a lot more suitable for individuals and small teams. Scaleform looks great, but it does definitely have timesink written all over it.
     
  9. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    http://blogs.unity3d.com/2012/06/29/the-new-gui/

    I keep forgetting to check the Unity blog and they hide the most awesome news there. What I love about the Unity GUI is their focus on productivity, which is exactly what I find most lacking in the Flash => Scaleform => Your Engine pipeline.
     
  10. MatthewDoyle

    MatthewDoyle

    Joined:
    Jul 13, 2012
    Posts:
    13
    Actually, the workflow is more like Flash -> Game, as Scaleform is a runtime not really a tool per se. You develop UI in the Flash editor, then put it into your game. You can contorl the UI directly in Flash, or use Scaleform's direct access API to control UI elements form C# or Lua.

    Scaleform has been used effectively by small teams to create mobile games as well. It is a feature rich and robust UI framework, as well as a 2D game engine.

    As to CLIK, that's correct - all UI widgets like buttons, checkboxes, etc. are already built for you in ActionScript/Flash. You just drag and drop, reskin with Photoshop, and add basic functionality in script for what happens when you push a button, etc. such as:

    MyButton.addEventListener("CLIK_Press", handleButtonPress);

    function handleButtonPress(e:Event):void
    {
    // Do something...
    }
     
  11. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    I recently evaluated it in its latest july version.

    It has surely a nice integration but the current version is definitely not production usable in a larger scale production at least for iOS and out of my personal view:

    1. They have rather worrysome 'trivial' platform define errors at least in the iOS SDK (reported including fix before the august release but didn't get addressed) which prevents you from testing iOS builds in the editor. If thats the quality and interest with which the whole integration is done, then the price does not matter to me, its just not worth wasting my time - I hope they are going to address that and give the Unity integration a bit more love than they did so far as they can't expect to sell licenses without investing into getting the real scaleform experience into Unity.
    2. It does not free any memory allocated in the swf it seems. If you load images inside the flash, it will just keep that memory alife even if you free the image inside the flash
    3. unloading an swf does not free its memory either so better don't switch between movies (which otherwise works nicely)
    4. it has no render to texture so far - sounds like 'unimportant', but unluckily this feature is the core behind 'SetExternalTexture' in UDK which allows you to tell the Unity binding to set a given texture within the flash movie to a texture2D etc within unity - thats how I struggled over issue 2 as you need to really load it from the outside


    The good things though are:
    1. You can use any swf designer that is able to load in other flash libraries as click is an opensource addition you use
    2. its nice to design over there and just have it work
    3. scaleform is the only vector driven UI framework for unity at the time and unitys new UI won't change that (I'm excluding the ragespline based one as its far from complete or competition)
    4. It loads stuff really fast at least subjectively (external jpg loaded through standard flash mechanisms with a res of 4096x4096 within the same time unity needs to load an internal 1024x1024 argb uncompressed texture kinda) - due to problem 2 and 3 I decided to not do any real timing as it does not matter how fast it is when even ipad2s get the app killed due to memory overloads
    5. the communication channel from flash to unity or unity to flash within scaleform is easy to use
     
    Last edited: Aug 10, 2012
  12. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,368
    Tanks for your input Dreamora, I'll probably wait a bit more, once scaleform for Unity is really production proven. But it's definitely something i really want to try for our next project (later this year).
     
  13. MatthewDoyle

    MatthewDoyle

    Joined:
    Jul 13, 2012
    Posts:
    13
    Hey guys. I understand there are some kinks the Scaleform Unity integration needs to get worked out. Thanks for your input. I'm going to pass this stuff on to our team.
     
  14. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Dreamora - thanks for sharing. I expected a lot more from Scaleform.
    Gigi
     
  15. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    True, the reason why I always put Scaleform as an extra step is that not all Flash features work as expected, or at all, once they hit Scaleform.

    As an example, people have pointed out that Scaleform provides a Vector-based UI system and that is true. However, do not disregard the sometimes significant CPU overhead of that vector rendering. Modern hardware does not support anti-aliased vector shapes so Scaleform builds the shapes out of polys, using hundreds of tiny, semi-transparent polygons for antialiasing. On beefy PCs and modern consoles this is manageable but it was a nightmare getting usable performance on a Wii. We found that many of the vector transformations and effects were not practically usable and we ended up with a pretty traditional bitmap UI. This may or may not be an issue for mobile consoles.

    I just want people to know that Scaleform isn't a magic tool that perfectly translates Flash to your engine, it comes with it's own limitations and considerations as well.
     
  16. MatthewDoyle

    MatthewDoyle

    Joined:
    Jul 13, 2012
    Posts:
    13
    Yes. Like any tool, Scaleform has its limits, and there are good and bad ways to do things with the tool. But, the current gen of Scaleform is far superior to older versions, with a fully redesigned multithreaded renderer, and several performance optimizations such as intelligent batching of similar draw primitives. Obviously most games will use bitmaps for UI, rather than vectors - in fact I'd say the vast majority of games use bitmaps. While other Flash runtimes have finally caught up to Scaleform in terms of hardware accelerated performance, Scaleform still does alot better at rendering a cleaner, more anti-aliased image.

    And it is true that Scaleform does not support some Flash features, but very few of those features are critical to UI development, or they can be handled in native code or game script instead, and their output sent to Scaleform to be rendered in the UI. We did get around to adding bitmapdata support, as well as XML, and regular expressions though. So those are a big plus. :)

    Scaleform has been used in many AAA titles despite it's few limitations - Batman: Arkham Asylum City; Borerlands, Skyrm, Deus Ex: HR, Gears 3, The Witcher 2, and the list goes on. It is also very widely used in China and Korea as the defacto game UI runtime. All of these studios require the best performance for their games, and expect nothing less than a top tier UI runtime. They have consistently chosen Scaleform as that runtime for good reason. And now, it's available for Unity developers at a fraction of the cost. Also bear in mind that, Scaleform will continue to grow and be improved upon. As part of Autodesk, the end user experience has been a new major push for the Scaleform team.
     
    Last edited: Aug 20, 2012
  17. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    As for RageTools Pro, I could agree with you considering our last version but with our new version features you can easily re-create any GUI I've seen built with ScaleForm:
    - The new RageButton component allows for easy setup of button hover-in, click and hover-out behaviors
    - Native HOTween integration provides super-performant and visual-setup tweening for any GUI actions
    - Perspective-camera compatible RageSplines mean you can rotate your vector art freely in 3D without disarranging shapes ordering like in the past

    Don't take my word for it, just check our faithful re-creation of the new Unity GUI sample scene from Nicholas Francis:



    Needless to say, RageTools Pro completely integrated workflow means blazing fast productivity, perfect compatibility with the new Unity GUI system (once released) and less deployment setup hassle, not to mention it supports all Unity deployment options, not only iOS and Android. We've even used it successfully to build vector games for Flash - not a single ActionScript line needed.

    PS.: If you're interested, we're entering the last week of our Asset Store Hot Deals promotion with 40% and 50% discounts
     
    Last edited: Aug 19, 2012