Starling Builder FAQ

Engine

What does the engine do?

The engine is responsible for converting layouts to/from display objects. It also has built in localization and tweening support. There’s a helper class called StageUtil to handle multiple resolutions in a Starling Builder recommended way, but it’s totally optional.

What do you need to get the engine running in my project?

The engine is super lightweight and you only need Starling to get it running. However if you are using FeathersUI components or other custom UI components in your layouts, then you will need them in your project as well.

Is the engine stable enough for use?

Absolutely, we are already using it in most of our current and upcoming Starling based games. (Juice Jam, Book of Life) The engine code is super lightweight and very stable. The rest is all about how stable Starling and Feathers are, and you already knew the answer:)

What are the Pros and Cons of using Starling Builder versus other UI solutions like GAF?

Pros:

  • Since both the editor and the game are running the same code, they are guaranteed to look the same.
  • Running Starling in the editor makes it possible to deeply integrate every feature of Starling into the editor.
  • Since it’s deeply integrated into Starling, the runtime(engine) is super lightweight(<1000 lines of code), which means you have no risk to use it.

Cons:

  • The editor user experience is not as good as Animate CC, but it will get better over time!
  • Timeline animation is not supported, but it still supports Starling's MovieClip and tween based animation.
  • Since it’s deeply integrated into Starling Framework, it makes it difficult to support other platforms.

Is there any performance impact using the engine?

The engine’s job is simple: it interprets layout data to create display objects. It’s nothing different than manually writing code to create them.

However, parsing json data may be heavy sometimes. So it’s highly recommended to cache the parsed as3 object in order to avoid parsing the same data again. There's a helper class called LayoutLoader can help you to parse and cache layout data.

Why am I getting this error? Error #1065: Variable SOME_CLASS_NAME is not defined

Because the UI components are dynamically created by the layout file, the compiler may not compile them into the project. In this case you need to manually link them into your project like this:

public static const linkers:Array = [SOME_CLASS_NAME];

Why auto binding isn't working?

Make sure you have met the following requirements for the property you want to bind

  • Property is public variable
  • Property name starts with _
  • Property name is the same of the display object name

Editor

Who will use the editor, artists or engineers?

Either artists or engineers can use it. The best workflow is artists layout the UI first, then engineers review and make sure it’s good to use. Using the editor doesn’t require any programming skills, but it’s better if you know some basic UI components of Starling Framework(Image, Sprite, TextField, etc). Anyways it’s easy to learn, you can get more information from the Starling wiki.

The editor crashes without showing any errors

It's most likely caused by the library version of libs in your workspace is not compatible with the one in the editor. You can fix it by doing any one of these ways:

  • Replace/delete the problematic files in your workspace/libs folder
  • Relocate/delete your workspace folder (will ask to choose workspace again)
  • Delete Shared Object folder of the app (will ask to choose workspace again)

Here are the default shared object locations

Windows C:\Users\<UserName>\AppData\Roaming\com.sgn.starling-builder2
Mac /Users/<UserName>/Library/Application Support/com.sgn.starling-builder2

The editor shows an error before opening any file

It's most likely some of your setting files are malformed. You should check what you have changed recently and fix the problematic setting files

The editor shows an error after opening a layout file

It's most likely either the layout file you just opened is malformed, or some assets are missing. Check the error to see what’s the problem

The editor shows an error and I can’t figure out what’s causing it

In this case you may try to compile the editor and debug it to figure out.

There are starling.display.Button and feathers.controls.Button, and starling.text.TextField and feathers.controls.Label, which ones should I use?

You can change the look of the Starling Button and TextField directly from the editor. But you can’t do the same thing for Feathers Button and Label, you need to write your custom theme extension to be able to do that.

If you are making games that requires different look for buttons and texts, I would recommend to use Starling Button and Starling TextField. If you are making an app that requires consistent look for buttons and texts, then using Feathers Button and Feathers Label maybe a better choice.

When I rotate a TextField and hit test button, the TextField position is off.

The reason of this problem is TextField needs to save width/height but rotation will also affect width/height. Since Sprite saves scaleX/scaleY instead of width/height, you can wrap the TextField into a Sprite and rotate the Sprite as a workaround.

Extensions

After I drop in the EmbeddedComponent.swf to libs folder, I can’t see my custom components

You need to delete your template override in you workspace. Either go to Menu → Workspace → Delete template override, or delete your workspace/editor_template.json. Then reload the editor to take effect.

I can see the my custom UI component in the editor, but I got this error when I click on it: Error #1065: Variable SOME_CLASS_NAME is not defined

First of all check libs folder to see if EmbeddedComponent.swf is present. Also you need to make sure to link your UI component class into your swf source file. The typical place to do that is EmbeddedComponents.linkers.

  builder/faq.txt · Last modified: 2016/10/03 17:04 by johannh
 
Powered by DokuWiki