World Tree

Booty5 world tree panel

Selecting Resources

The world tree (situated to the left hand side of the editor window, see image below) is a tree view that shows the list of all resources that make up the project. It is here where you will see an overview and be able to select all resources such as bitmaps, brushes, shapes, scenes, scripts and so on and so forth that make up the game.

To view a resource simply click on the resource in the world tree. Selecting a resource will display the resources properties in the properties panel to the right. If the resource that you click is a scene or actor (Sprite / Label etc..) then the scene or actor will also be selected on the central canvas. Double clicking the scene or actor in the world tree will centralise the canvas camera on the selected scene or actor.

Resource Colour Coding

All resources in the world tree view are colour coded to enable easy spotting of resource types. Resources are coloured as follows:

Dark blue – image resources

Cyan – sound resources

Light blue – brush resources

Yellow – shape resources

Vivid red – material resources

White – script resources

Red – Sprite resources

Light red – label resources

Bright green – scene resources

More resource types will be added in the future.

Resource Import via Drag / Drop

Resources can be dragged from explorer onto the world tree to add them to the editor. Currently the following resource types are supported:

TexturePacker XML files – Dragging a texture packer file onto the world tree will import the image and generate brushes for each sprite located in the texture packer file. Dropping the file onto a scene will place the resources into that scene. Note that, if resources with the same name already exist then they will be replaced. This offers an easy way to update art work in the editor if it has been modified outside of it

PNG / JPEG – Dragging a PNG or JPEG file into the world tree will import the image as an image resource and create a brush that can be used to display the image. Like with texture packer images and brushes, dropping images onto a scene will place the resources into that scene

SVG – Dragging a SVG file onto the world tree will import the SVG data into the editor, generating a scene, images, brushes, shapes and actors. Dropping the SVG file onto an existing scene will import the SVG into that scene

Script files – Dragging script files onto the world tree will import the scripts file into the editor. Dropping the script files onto an existing scene will import the scripts into that scene

Note that you can drop a collection of resources onto the editor and they will all be imported. This allows you to drag a complete folder full of resources straight into the editor.

General Drag / Drop

You can drag various resources around in the world tree and drop them to reposition and assign them. The following drag/drop functionality is available:

Setting brush image – Dragging and dropping an image onto a brush will assign the image to that brush

Setting actor brush / shape – Dragging and dropping a brush or shape onto an actor will assign it to that actor

Setting actor material – Dragging and dropping a material onto an actor will create a physics fixture and attach it to the assigned actor

Dropping an actor onto another actor will make the dropped actor a child of the drop target actor. If the left shift key is pressed during the drop then the dropped actor will be placed above the drop target actor in the tree order

Dropping an actor onto a scene will move the actor to that scene

Dropping an actor onto an empty portion of the world tree will move the actor to the last position in the scene

Dropping a general resource (not an actor) onto a scene will move the resource to that scene

Dropping a general resource (not an actor) onto an empty area of the world tree will move the resource into the global resource space

A few notes:

When moving resources around from scene to scene, if objects that use the moved resource find that it is no longer available then they will not display correctly. For example, if you move an image from scene 1 to scene 2, all brushes in scene 1 that used that image will no longer be valid. Any actors that use those brushes in scene 1 will not display a texture

When moving actors between scenes, remember that if the resources that make up that actor such as shapes, geometries, images, brushes, materials etc.. are not available in the new scene or global resource space then the actor will be affected. For example, if the geometry that the actor is using is not present in the new scene then it will be displayed as a simple sprite instead of a complex geometry.

Tools Panel

The world tree tools panel is located at the top of the world tree and offers a number of useful tools including:

Resource hiding – The coloured buttons represent the different types of resources that can be shown / hidden in the world tree. Clicking these buttons will toggle these types of resources on and off. This is useful for making space in the world tree when editing large levels with lots of resources

Clone – Selecting a resource then clicking the “+” button will clone the resource and all of its children

Delete – Selecting a resource then clicking the “-” button will delete the resource and all of its children

Move resource up – Selecting a resource then clicking the “▲” button will move the resource and all of its children up in the hierarchy

Move resource down – Selecting a resource then clicking the “▼” button will move the resource and all of its children up in the hierarchy

Note that resources are grouped together by type in the world tree.

Context Menu

The world tree supports a context menu that is displayed when right clicking on the world tree or on a resource in the world tree. Right clicking on the resource tree will show a menu with the following options:

Scene – Creates a new scene in the global resource space

Brush – Creates a new brush in the global resource space

Image – Creates a new image in the global resource space

Sound – Creates a new sound in the global resource space

Font – Creates a new font in the global resource space

Shape – Creates a new shape in the global resource space

Material – Creates a new material in the global resource space

Script – Creates a new script in the global resource space

Right clicking on a resource in the world tree will show a menu with the following options:

New – Contains a sub menu that allows you to create resources of a specific type

Clone – Clones the resource

Delete – Deletes the resource

Move Up – moves the resource upwards in the hierarchy

Move Down – moves the resource downwards in the hierarchy

Right clicking on an actor in the world tree will show a menu with the following options:

New – Contains a sub menu that allows you to create resources of a specific type

Clone – Clones the resource

Delete – Deletes the resource

Clone to all scenes – Creates a copy of the selected actor in every scene

Delete from all scenes – Deletes the actor and all actors with the same name in all other scenes

Copy to scene – Creates a copy of the actor and sends it to a specific scene