Resource Property Reference


Resource Properties

In this section we cover the various properties for each of the different types of resources to give you a better understanding as to what they all mean. Booty5 supports tool tips which give you a brief description of what each property is. Note that when naming resources, resources of the same type should not generally share the same name. Booty5 in many instances will generate a unique name for each object that is created.

World Properties

World properties relate to the app as a whole and not to any particular resource. To access the World properties click on an empty area of the canvas or lick the World button on the canvas. These properties include:

Precision properties

  • Import precision – Sets the number of decimal places that coordinates will be rounded to when importing geometry data into Booty5
  • Export precision – Sets the number of decimal places that coordinates will be rounded to when exporting data out of Booty5

Editing properties

  • Move speed – Sets the speed at which to move objects on the canvas with cursor keys
  • Rotate speed – Sets the speed at which to rotate objects on the canvas with Z/X keys
  • Scale speed – Sets the speed at which to scale objects on the canvas with Page Up / Down keys
  • Mouse rotate speed – Speed at which to rotate objects on the canvas when rotating with the mouse

Snapping properties

  • X snap range – Range at which to snap edges and vertices horizontally
  • Y snap range – Range at which to snap edges and vertices vertically
  • Inclusion range – Range at which to consider objects for edge and vertex snapping. Can be used in heavily populated scenes to improve snapping selection

Virtual screen properties

  • Virtual screen size – Sets the design size of the screen that the app will work with, this also decides where docked actors will be docked.
  • Show screen – Enables a preview of the virtual screen size on the canvas

Image Properties

Image properties relate to image resources and have the following properties:

  • Name – Name of this image resource
  • Folder – Sub folder to export this resource to
  • Tag – Resource tag (used to group resources together)
  • Location – File name of the image file including extension (can include web addresses)
  • Preload – If set to true then the image will be loaded immediately when the game boots (global resources) or when the scene loads (local resources)

The Image properties panel contains a “Locate” button which can be used to locate the images file in explorer.

Brush properties

Brush properties relate to brush resources and have the following properties:

  • Name – Name of this brush resource
  • Tag – Resource tag (used to group resources together)
  • Brush Type – The type of brush (image or gradient)

Image brush properties:

  • Image – Sets the image that is associated with the brush. You can click the change image button to choose from a list of available images.
  • Rect (x, y, width, height) – A rectangular area that represents a sub image of a larger image
  • Offset (x, y) – The image offset
  • Anim Frames – A collection of rect (x, y, width, height) frames that represent sub images within a larger image that will be used to create a bit-mapped based animation. You can use the Add/Remove buttons to “Add” and “Remove” animation frames. You can also use the “Gen” button to auto generate frames from a sprite atlas or the “Gen From” to generate frames from a collection of brushes starting from this brush.

The Brush properties panel contains a “Locate” button which can be used to locate the image that is assigned to the brush in the world tree.
The brush animations section contains a list of bitmap animations that are associated with this brush. Animations can be added and removed using the +/- buttons. Each animation has a name, a list of frame indices and speed at which to play back the animation.

The Brush Preview shows you where the brush is located in the source texture, whilst the Animation Preview shows a preview of the animation.

Gradient brush properties:

  • Gradient stops – A collection of gradient stops, each gradient stop has a colour and an offset, with the offset having a value of between 0 and 1, specifying how far along the gradient the colour stop should take affect. You can use the Add/Remove buttons to “Add” and “Remove” colour stops.

Sound Properties

Sound properties relate to sound resources and have the following properties:

  • Name – Name of this sound resource
  • Folder – Sub folder to export this resource to
  • Tag – Resource tag (used to group resources together)
  • Location – File name of the sound file including extension (can include web addresses)
  • Fallback Lcation – File name of the sound file including extension (can include web addresses) that will be used if the sound file at Location is not compatible
  • Preload – If set to true then the sound will be loaded immediately when the game boots (global resources) or when the scene loads (local resources)
  • Reuse – If set to true then this sound effects instance will be shared and re-used instead of creating a new instance each time it is played
  • Loop – If set to true then sound file will be looped when played
  • Auto Play – If set to true then sound will play as soon as it has loaded

The Sound properties panel contains a “Locate” button which can be used to locate the sound file in explorer.

Shape Properties

Shape properties relate to physics, visual and clipper shape resources and have the following properties:

  • Name – Name of this brush resource
  • Tag – Resource tag (used to group resources together)
  • Type – Type of shape (box, circle or polygon)
  • Width – Width of shape if it is a box or radius of shape if it is a circle
  • Height – Height of shape if it is a box
  • Absolute – If true the vertices that make up the polygon shape will be classed as though they are in world coordinates, otherwise shape vertices will be classed as local
  • IsPath – If true then this shape will not be classed as a path and not a shape

When the type of shape is set to Polygon an “Edit shape” button will appear that allows you to edit the shape.

Material Properties

Material properties relate to physics material resources and have the following properties:

  • Name – Name of the physics material
  • Tag – Resource tag (used to group resources together)
  • Type – Type of physics material (values can be static, dynamic and kinematic)
  • Density – The objects density (default is 1.0)
  • Friction – The coefficient of friction (default is 1.0)
  • Restitution – The coefficient of restitution / bounciness (default is 0.1)
  • Gravity Scale – This is the amount to scale the affect of gravity on objects that this material is attached to (default is 1.0)
  • IsBullet – If set to true, will force the object that this material is attached to to be treat as a high speed moving object (required more processing so use wisely) (default is false)
  • Fixed Rotation (boolean) – If set to true then the object that this material attaches to will not be allowed to rotate (default is false)

Script Properties

Script properties relate to script resources and have the following properties:

  • Name – The name of the script file
  • Tag – Resource tag (used to group resources together)
  • Location – The location of the script file
  • Type – The type of script, can currently select between Lua, JavaScript, C#, C++ and Python etc..
  • Load – If true then the script will be loaded on application start, otherwise you will need to manually load the script

Scene Properties

Scene properties relate to scene resources and have the following properties:

General Properties

  • Name – The name of the scene is a very important property and should be chosen so that it does not conflict with names of other scenes that are present at the same time. It is possible to have multiple scenes with the same name, but only one of those scenes can be created. It is possible to destroy a scene and create a new scene of the same name. A scene name should also be memorable as you may want to refer to the scene from other areas in the game
  • Export Name – Name of the scene in its exported file, this allows you to specify a different scene name to its exported file name
  • Tag – Resource tag (used to group resources together)
  • Layer – The visual layer that this scene should be rendered on (not currently used)
  • Extents (x, y, width, height) – A rectangular area that describes the extents of the scenes world. The camera will be prevented from moving beyond the extents range and actors that have Wrap Position set to true will wrap from one side of the extents to the other when they travel beyond the extents
  • Frozen – When scene is frozen it cannot be selected on the canvas
  • Active – The active state of a scene determines if the scene is processing its contents. If not active then scene processing will stop and any content that is contained within the scene will also stop processing
  • Has focus – If true then the scene is made the current focus scene
  • Secondary focus – If true then the scene is made the secondary focus scene. Objects in the secondary focus scene will receive messages if nothing in the primary focus scene receives a message
  • Export At Origin – The scene will be exported as though it is located at the 0,0 origin regardless of its position
  • Load – If set to true then this scene will be loaded and ran on boot

Camera Properties

  • Position (x, y) – The position of the scene in virtual canvas coordinates
  • Camera (x, y) – Scenes initial camera position
  • Touch Pan – When touch panning is true the user will be able to use their finger or mouse to move the camera around the scene, Panning can be locked to a single axis or both
  • Target X – Sets the actor that the camera will follow on its x-axis. You can click the change target button to choose from a list of available camera targets
  • Target Y – Sets the actor that the camera will follow on its y-axis. You can click the change target button to choose from a list of available camera targets
  • Follow Speed (x, y) – The speed at which the camera should track the specified target actor(s). Higher values will catch the camera up to the actors target position faster
  • Velocity Damping (x, y) – Amount of damping to apply to the cameras velocity (x, y) each frame. This value when set to a value of less than 1.0, 1.0 will cause the camera to slow down over time.

Visual Properties

  • Visible – If a scene is not visible then it will be hidden from view, although the scene and its contents will still be processed.
  • ClipChildren – When true the scene will clip its children
  • Colour (r, g, b, a) – The colour of the scene, Each component red, green, blue and alpha should be between the value of 0 and 255 (0 is no colour, whilst 255 is full colour)
  • CanvasSize (x, y) – The virtual screen size
  • CanvasFit – Currently unused
  • ClipShape – The shape that will be used to clip children, if none supplied then a rectangle the size of scene will be used. You can click the change clip shape button to choose from a list of available shapes.

User Properties

  • Name – The name of the property
  • Value – The properties value
  • Type – The type of the property

To add a new user property click the Add button in the User properties section. To remove user properties, select them in the user properties section then click the Remove button. User properties will be written to the created scene object and can be accessed as usual properties.

Actions List Properties

  • Name – Name of actions list
  • Repeat – number of times to repeat actions list, 0 is forever
  • Play – If true then actions list will automatically play when object is created
  • Edit – Opens the actions list editor

Physics Properties

  • Physics – Enables or disables physics processing in the scene. Can only be set when scene is declared
  • DoSleep – If set to true then actors that utilise physics will be allowed to sleep when they are not moving / interacting, can speed physics simulation up greatly by enabling this options
  • Gravity (x, y) – Box2D directional world gravity (default is 0.10)
  • World Scale (x, y) – Box2D world scale (default is 10,10)
  • Physics Timestep – Sets how fast the physics engine updates the physics world in seconds (default value is 0.3333)

Event Properties

  • OnCreate – Provides a list of actions that is called when the scene is created
  • OnDestroy – Provides a list of actions that is called when the scene is destroyed
  • OnTick – Provides a list of actions that is called every time the scene is updated (30 to 60 times per second), Quick maps this to update event
  • OnTapped – Provides a list of actions that is called when the screen is tapped when this scene has focus
  • OnBeginTouch – Provides a list of actions that is called when the user begins touching screen whilst this scene has focus
  • OnEndTouch – Provides a list of actions that is called when the user stops touching screen whilst this scene has focus
  • OnMoveTouch – Provides a list of actions that is called when the user moves a touch on the screen whilst this scene has focus
  • OnOrientationChange – Not currently used
  • OnKeyPress – Provides a list of actions that is called when the user presses a key
  • OnKeyDown – Provides a list of actions that is called when the user presses a key down
  • OnKeyUp – Provides a list of actions that is called when the user stops pressesing a key down

Sprite Actor Properties

Properties in this section belong to the base Sprite actor type

General Properties

  • Name – Name of the actor, used to refer to the actor from scripts and such. Note that no two actors in the same scene should share the same name.
  • Tag – Resource tag (used to group resources together)
  • Position (x, y) – The actors position within the scene (default is 0, 0)
  • Scale (x, y) – The x and y axis scale of the actor (default is 1, 1, which represents no scaling)
  • Angle (degrees) – The angle of the actor (default is 0)
  • Origin (x, y) – Sets the offset around which the actor will rotate and scale (default is 0,0)
  • Layer – The visible layer that the actor should appear on (Not currently usedr
  • Render As – Change the type of actor from the base Actor to either ArcActor or RectActor. Note that actors that have a geometry attached will automatically be changed to a PolygonActor
  • Frozen – When actor is frozen it cannot be selected on the canvas
  • Active – Active state (default is true), actors that are not active will not be processed
  • Touchable – If true then this actor will receive touch events when touched (default is false)
  • Virtual – If selected the the actor becomes a container that clips its children and allows the user to drag the content around; the scroll range of the canvas is determined by the Scroll Range property and the initial scroll position is set by Scroll Pos. Child actors that are docked will be docked to the edges of this actor instead of the screen and will not scroll.

Visual Properties

  • Visible – Visible state (default is true), actors that are not visible will not be shown on screen.
  • Filled – If set to true and object is set to render as a shape or has a shape attached then shape will be rendered filled, otherwise it will be rendered as an outline using stokr colour and thickness
  • FlipX – If true then this actors texture is horizontally flipped
  • FlipY – If true then this actors texture is vertically flipped
  • Orphan – if set to true then object will not obey its parents visual transforms
  • Use Parent Opacity – When set to true this actor will scale its own opacity by its parents opacity (default is true)
  • Ignore Camera – If set to true then this actor will ignore the cameras transformation staying in place when when the camera moves (default is false)
  • ClipChildren – if set to true then child actors of this actor will be clipped, if not clip shape is supplied then the extents of the parent actor will be used to clip against
  • SelfClip – if set to true then this actor will be clipped against the supplied clip shape
  • Cache – If set to true then this object will be pre-rendered to an off screen cached canvas when first drawn, subsequent rendering of this object will render the cached canvas, this can speed up rendering of geometry many times
  • Merge – if set to true then the object will attempt to render itself into the parents cache
  • Ignore Atlas Size – If enabled then actor will use the specified size instead of overwriting it with the size of the atlas frame
  • Round Pixels – If enabled then vertices will be rounded to integer which can speed up rendering significantly but at a loss of precision
  • Size (x, y) – The world size of the actor
  • Background – This is the background brush that is displayed for this actor. You can click the change brush button to choose from a list of available brushes.
  • Colour (r, g, b, a) – The colour of the actor, Each component red, green, blue and alpha should be between the value of 0 and 255 (0 is no colour, whilst 255 is full colour, default)
  • Stroke Colour (r, g, b, a) – The colour of the actor when rendered unfilled, Each component red, green, blue and alpha should be between the value of 0 and 255 (0 is no colour, whilst 255 is full colour, default)
  • Stroke thickness – The thickness of the stroke
  • Corner radius – The radius of the corner for rounded rects (only works with actors that are overridden as rect)
  • Geometry – Sets the shape that will be used to render the actors shape, if no shape set then a rectangular sprite will be used. if supplied then actor will be exported as a PolygonActor. You can click the change geometry shape button to choose from a list of available shapes.
  • Depth – Depth of the actor in 3D (larger values move the sprite further away, default is 1.0 for parent actors and 0.0 for child actors)
  • Docking – When set will dock the actor to an edge of the scene or canvas (if a child of a canvas based Sprite actor), valid values are top, left, right, bottom, topleft, topright, bottomleft and bottomright
  • ClipShape – A shape that will be used to clip the actor and or its children. You can click the change clipping shape button to choose from a list of available shapes.
  • Composite Op – The composite operation to use when rendering this object

Tile Map Properties

  • Tile Size – Width and height of tiles in the tile map in pixels
  • Map Size – Width and height of the tile map in cells
  • Display Size – Width and height of the map area to display on screen when running in the game engine, this can be used to drastically reduce the total number of tiles rendered. If the map is very small or you wish to rotate, scale or translate the map then set the display size to the same size as map size
  • Collision Tiles – Contains a brush that will be used to provide collision tiles, collision tiles should be the same size as visual tiles
  • Export collision – If set to true then collision map tiles will be exported with the visual map
  • Edit Map button – Allows you to edit the tile map

Brush Animation Properties

  • Default animation – The name of the default brush animation to play on this actor (brush animations are located in the brush)

Shadow and Gradient Properties

  • Shadow – If enabled then this object will be rendered with a shadow
  • Colour (r, g, b, a) – The colour of the shadow
  • Offset (x, y) – The x,y offset at which to render the shadow
  • Blur – The amount to blur the shadow
  • Gradient Start – The start position of the gradient
  • Gradient End – The end position of the gradient

User Properties

  • Name – The name of the property
  • Value – The properties value
  • Type – The type of the property

To add a new user property click the Add button in the User properties section. To remove user properties, select them in the user properties section then click the Remove button. User properties will be written to the created actor object and can be accessed as usual properties.

Actions List Properties

  • Name – Name of actions list
  • Repeat – number of times to repeat actions list, 0 is forever
  • Play – If true then actions list will automatically play when object is created
  • Edit – Opens the actions list editor

Other Properties

  • Spring – If this actor allows scrolling and the user scrolls out of bounds then the actor will spring back into place (much like the iOS UI system) (not currently used)
  • Bubbling – When set to true, touch events can bubble up from child actors to parents,
  • Clip Margin (left, right, top, bottom) – If this element contains children that are clipped then this margin will push the clipping inwards to create a border (left, right, top, bottom)
  • Scroll Range (left, top, width, height) – Sets the range that the contents of this actor can be scrolled. Used by virtual actors
  • Scroll Pos (top, left) – Sets the initial scroll position of the contained content. Used by virtual actors
  • Margin (left, right, top, bottom) – The amount of space to leave around the actor when placed in a container or docked. Used by virtual actors

Physics Properties

  • Velocity (x, y) – Initial velocity of the actor
  • Velocity Damping (x, y) – The amount to dampen velocity each frame, values of less than 1.0 will slow the actor down over time, values of greater than 1.0 will speed the actor up over time.
  • Angular Velocity – The rate at which the orientation of the actor changes in degrees per second
  • Angular Velocity Damping – The amount of rotational velocity damping to apply each frame
  • Wrap Position – If true then the actor will wrap at the edges of the canvas

Actors that do not have any fixtures attached will use a rudimentary fixtures system. Actors that do have fixtures attached will apply the set velocities as impulses and will only be applied once.

The physics properties section contains two additional sections:

  • Fixtures – This contains a collection of physical fixtures that define the shape of the actor to the physics engine. Each fixture has the following properties:
    • Shape – The name of a shape resource that defines the shape of the fixture. If a physics shape is not supplied then a rectangular shape of the same dimensions as the actor will be used. You can click the select fixture shape button to choose from a list of available shapes.
    • Material – The physics material resource that defines how the fixture behaves. You can click the select fixture material button to choose from a list of available materials.
    • Flags (category, mask, group) – Box2D collision flags
    • SR – Is sensor, sensor objects will recognise collisions but will not respond to them
  • Joints – This contains a collection of joints that connect different actors together. Each joint has the following potential properties (note that not all joints use all properties):
    • Name – Name of joint
    • Type – Type of joint (weld, distance, revolute, prismatic, pulley and wheel)
    • ActorB – Name of the actor that connects to this actor via the joint. You can click the select Actor B button to choose from a list of available actors.
    • OffsetA – The joint attachment position offset for this actor
    • OffsetB – The joint attachment position offset for other actor
    • GroundA (x, y) – Anchor point where pulley point for this actor is situated (pulley joints)
    • GroundB (x, y) – Anchor point where pulley point for the other actor is situated (pulley joints)
    • Collide – Self colliding if true
    • Frequency – Oscillation frequency in Hz (distance joint)
    • Damping – Oscillation damping ratio (distance joint)
    • Limit – Limits the range of movement of the joint if enabled (revolute, prismatic, wheel joints)
    • Lower – Lower joint limit (revolute, prismatic, wheel joints)
    • Upper – Upper joint limit (revolute, prismatic, wheel joints)
    • Motor – If true then motor is enabled (revolute, prismatic, wheel joints)
    • Speed – Motor speed (revolute, prismatic, wheel joints)
    • Torque – Maximum motor torque (revolute joints)
    • Force – Maximum motor force (prismatic, wheel joints)
    • Ref –reference angle, the initial angle between the two bodies. This is calculated if not supplied
    • Axis (x, y) – Axis of movement (prismatic, wheel joints)

Event Properties

  • OnTapped – When the user taps this actor it fires this event and calls the supplied actions list.
  • OnBeginTouch – When the user begins to touch this actor it fires this event and calls the supplied actions list.
  • OnEndTouch – When the user stops touching display and the touch pos hits the actor it fires this event and calls the supplied actions list.
  • OnLostTouchFocus – When the user stops touching this actor it fires this event and calls the supplied actions list.
  • OnMoveTouch – When the user moves a touch over this actor it fires this event and calls the supplied actions list.
  • OnCreate – When this actor is first created it fires this event and calls the supplied actions list
  • OnDestroy – When the actor is about to be destroyed it fires this event and calls the supplied actions list
  • OnTick – Provides an actions list that is called every time the scene is updated (30 to 60 times per second)
  • OnCollisionStart – When two actor that have Box2D physics enabled start to collide it fires this event and calls the supplied actions list
  • OnCollisionEnd – When two actor that have Box2D physics enabled stop colliding it fires this event and calls the supplied actions list

Label Actor Properties

Label properties relate to label (text based actor) resources. Labels are derived from the Sprite actor inheriting all of its properties. In addition to those properties the following properties are provided to modify the text of the label:

  • Text – The text to display
  • Font – Name of font used to display text, e.g. Arial
  • Font Weight – Weight of font, e.g. Bold
  • Font Size – Pixel size of the font
  • Text Colour (r, g, b, a) – Colour of text
  • Text Stroke (r, g, b, a) – Stroke colour of text
  • AlignH – Horizontal alignment of text (left, right, centre)
  • AlignV – Vertical alignment of text (top, bottom, middle)
  • Wrap – Text will be wrapped if true

Related topics:

1,627 total views, 2 views today