Welcome to the Clickteam Blogs
This new area of our site will host a range of blogs including Clickteam News, information about Fusion 3 development, ClickStore Features, User Devlogs and much more besides.

If you would like to write a guest blog article about your game, app, development or something else then please Contact Us for more information.
Posted on: November 14, 2016
This time I’m going to talk about layers. Some notion of layers are used in all games. Usually you have a “game” layer and some sort of user interface layer that always exist on top of the rest of the world. Sometimes you have a background layer for distant objects or other effects.

Layers themselves are usually not that interesting. They usually just contain objects and not much more. Layers in Fusion 2.5 is an ordered list sorted from top to bottom. Each layer can contain a large number of objects and can on Windows have it’s own effect that applies to everything. Each layer can also be scrolled to a given position but usually just follows the global scrolled position.

So why a dedicated blog post on layers for Fusion3? Because they will change drastically to make your life so much easier in many ways that might not be immediately obvious.

Fusion3 differs quite a bit from all of this on several key areas:

  • – Hierarchy, in both layers and objects
  • – Private coordinate system
  • – Layout mechanisms (expand to parent, fit inside, fit outside, stretch, ect. ect.)
  • – Certain automated object layout systems
  • I can’t fit all of these topics into one blog post so I’m going to split this one up.

    Layer tree

    You might notice a trend in these blog posts when it comes to revisiting old features; lists of things are typically turned into trees/hierarchies. The layer system is no exception.

    Layers will in Fusion3 be a tree of layers in the sense that each layer can have a list of sub-layers. And those layers can have sub-layers as well. This allows you to do complex combinations of effects if so desired. Having the layers as a tree is actually a relatively simple change. It is not here the true power of the new Layer system lies though.

    Object sub-layers

    We have previously talked about how you can make your own custom objects that are a combination of other objects. So how will you organize all those objects that your object is made out of? In a layer of course! But what layer? Answer: In your object’s sub-layer.

    Any object in Fusion3 can have an optional sub-layer. In that sublayer you can place any objects you might want to. So if you see the complete hierarchy of objects in a Fusion3 app/game you will see layers and objects interwoven in logical ways.

    Say you want to create a custom animated checkbox object with a background image and a checkmark sprite your object hierarchy would look like this:

  • Your “base” object
  • -Checkmark sprite
  • -Background sprite
  • The “base” object can be any type of object of your choosing. Usually you would pick a Sprite/Active object but you can also chose the parent type “FrameObject” which is an empty object that does nothing. In your object’s custom events you can check for when the object gets clicked and then animate the state of the checkbox. You can also extend on other existing types. In Fusion3 the layers will be an integral part of how objects are managed and are not only limited to something you find in a “Frame”.

    We’d love to hear your comments on our blog posts and on our development.
    Throw us a mention on Twitter or Facebook and tell us what you think!

    Visit Clickteam @ FacebookVisit Clickteam @ TwitterVisit Clickteam @ YoutubeVisit Clickteam @ TwitchVisit Clickteam's The Reactor @ PatreonVisit Clickteam @