Animation File Guide

iAppsBeats uses BANI files to create key-frame animations for the game, and in order to make animations out of them, the file contents are in JSON format so that the game can easily read the data. The bani file is then uploaded into the File repository for the game under animations folder.

iAppsBeats uses a custom in-house developed animation editor, which is found on iappsbeats.com/animations/.

You can also create particles using bani files, see Particle Engine for more information.

Properties (Introduction)

a BANI file consist of a few basic properties. You have the filetype & aniversion, so that the game knows that this is an animation file and which engine animation version it should use to parse the file.

"filetype": "bbuilderani",
"aniversion": 1

There is the options object which tells the game some basic properties such as if the animation should be looping, be continuous, and where the center of the animations are, and a few other things.

"options": {
  "looping": 0,
  "continuous": 1,
  "center": [24, 24]
}

You also have defaults where you can place template properties for your sprites that can be overwritten by the game, i.e. the player outfit (hat, head, body, etc.) or which arrow to use for projectile-

"defaults": {
  "ARROW":  "bbuilder_arrow1.png"
}

You can also use ARG1..9 to reference this./player.aniarg1..9 set by script. Parameters provided to the this./player.ani attribute after a comma can be referenced by PARAM1, PARAM2 etc.

After that- You have the sprites object and frames object, where you define the sprite id, bounds and image (gfx), and fames you place how these sprites are shown using it's ID and positions.

"sprites": {
   "0": {"gfx":"bbuilder_arrowshadow.png", "bounds":[0,0,64,16]},
   "1": {"gfx":"ARROW", "bounds":[0,0,80,16]}
}
"frames": [
  {
    "directions": [
      [[0,-24,0], [1,-24,-8]]
    ],
    "sound": ["arrow_fly1","arrow_fly2"]
  }
]

Supported Properties

Root level properties

Options properties

Default properties

Attributes defined in the defaults section are preloaded and reference attributes of the NPC or player when used by sprites.

Emitters properties

You can define an array of "emitters", see Emitter for parameters.

Sprites properties

Frame(s) properties