I’m in the process of porting an application from Unity to Defold, and a very large part of this project is menu-esque.
There are a lot of 9-sliced buttons, panels, and general UI behaviors.
It made sense to write this stuff using Defold GUI, but there have been a couple of hiccups.
Mainly I can’t have spine animation in GUI (as far as i’m aware) and a few of these menus feature spine-animated characters, and those are layered between GUI elements (for instance, a panel behind and a button on top).
So I thought, “ok, this wont work. I’ll just use the regular sprite workflow”, but this also caused hiccups, as I can’t 9-slice sprites and I’ve already had to write a custom render script to get aspect ratio independent behaviors.
There doesn’t seem to be a clean way of achieving a combined approach, as these menus are not static (lots of tweening around), and it creates a ton of awkward edge cases when elements from the sprite world and ui world have to overlap in specific orders.
Other factors I need to consider include Performance: will drawing hundreds of GUI objects be slower than drawing hundreds of Sprites, likely yes. But what about when custom sprite 9-slicing is also running?
Basically, I’d just like some general advice on how to go about porting complex UI-heavy stuff to Defold, and an answer to a couple of questions:
- How would you approach 9-slicing sprites in Defold?
- How would you approach spine-animating GUI elements?
- How do the performance of GUI manipulation and Sprite manipulation compare?