Disclaimer: Everything I’m saying here has not been approved and is under discussion. There is no deadline, no design document, and no exact dates/plans for now. Take this as a view of the problem, which can be solved this way, that way, or maybe it doesn’t need to be solved because it’s not a problem. I hope that’s clear.
TLDR:
- GUI used to be good but had few features, now there are many features, and it’s not as good as we’d like it to be (but still good ^__^);
- The “sprite world” will get better by adding new features;
- The GUI is another “world” but in a single component;
- Performance is our focus, which means we’ll try to add these features so nothing gets worse;
- We don’t plan to break anything too fast, and we will try to do everything we can to make the migration process as smooth as possible;
- We’re a small team and always will be.
More on the subject:
We have a “sprite world” and a pretty optimized GUI system. If you think about the GUI - it’s another world in one separate component. It has much worse decomposition than GOs and components. You can see that each type of node is kind of like a GO with a bunch of pre-installed components, you can’t delete or add more. Under the hood, it’s about the same, a pretty big structure that represents a node.
It wasn’t always like this. In the beginning, it was all compact and logical. But then, as it happens, users asked for features. For example, adding particles in the GUI (for those who don’t remember or don’t know, particles weren’t in the GUI, and in Bring Me Cakes, I solved it with predicates). Also, there were other additions like Spine etc.
In short, everything came to the point where users want more features in the GUI: 3D objects, Rive, etc.
But the GUI was not designed for that, and all these additions make it a Frankenstein monster, which is hard to support. It’s important that under the hood, there is quite a lot of code duplication.
But it’s not the end of the story. The features from the GUI began to be requested in the “sprite world,” which is also logical. 9-slice on sprites, it would be nice to have masks, and so on.
But here’s the problem: we are a small team, which even with infinite resources (which we do not have) does not want to grow very much. Support and development of two parallel “worlds” takes a lot of effort and time from the organizational point of view, and from the technical point of view, it doesn’t look great either.
The decision is obvious: “only one must remain.” But logic suggests that the decomposition to components is a better approach than a Frankenstein monster, where everything is added to the pile.
Since we have decided on the solution, now we need action points. The most important things are:
- To take all the advantages of the GUI and make it possible to use them in a “sprite world.” This is not a complete list, but an example:
- Anchors
-
gui.pick_node
analog (could be a method for a camera or something else)
- Vertex color (we want GUI-like batching), which essentially grows into a custom vertex format feature. Because it is super important NOT to make the usual world slow and, in fact, the same Frankenstein monster. It’s important that those who need super lightweight sprites and draw 15,000 of them can do it easily, as well as those who need mega functional sprites.
- And so on.
- The next point is performance and understanding that we really can do as much without GUI as with it. This includes conducting tests and possibly developing additional components that are not currently connected to the existing functionality.
- Once we can replicate everything that the GUI can do without actually using it, and it is fast enough, we can start discussing the other steps of the migration. There are several options for how to implement this, although we haven’t discussed them in detail. One potential approach is to deprecate the GUI so that no new features are added to it while keeping it available as an extension to ensure backward compatibility with old projects. In parallel with that, we provide migration guides and tools to make the migrations process easier.
I want to stress that points 2 and 3 are just preliminary ideas that came to mind. We still need to have more in-depth discussions on the matter. However, what we have already discussed is that we have received many feature requests that would make the “sprite world” function better. We will work to implement these requests thoughtfully.