BulletML Reference

BulletML Reference ver. 0.21 | (c) Kenta Cho(ABA."Saba") | ABA Games

BulletML simple reference.

<bulletml> - Defines the BulletML's body |

- Attribute - type = (none | vertical | horizontal)

- Contents - (bullet | action | fire)*

Define the BulletML's body.

A type attribute specifies that this barrage is for vertical scroll shooting or horizontal scroll shooting.

<bullet> - Defines attributes of a bullet |

- Attribute - label = STRING

- Contents - direction?, speed?, (action | actionRef)*

- Example

      <bullet label="downAccel">
      <direction>270</direction>
      <speed>2</speed>
      <action>
      <accel>
       <vertical>3</vertical>
       <term>120</term>
      </accel>
      </action>
      </bullet>

Defines the direction, the speed and the action of bullet.

A label attribute labels the bullet. The labeled bullet element is referred by bulletRef elements.

<action> - Defines the action of bullet |

- Attribute - label = STRING

- Contents - (repeat | fire | fireRef | changeSpeed | changeDirection | accel | wait | vanish | action | actionRef)*

- Example

      <action>
      <changeSpeed>
       <speed>0</speed>
       <term>60</term>
      </changeSpeed>
      <wait>60</wait>
      <fire><bullet/></fire>
      <fire>
       <direction type="absolute">330+$rand*25</direction>
       <bulletRef label="downAccel"/>
      </fire>
      <vanish/>
      </action>

Defines the action of bullet. The labeled action element is referred by actionRef elements.

<fire> - Fires a bullet |

- Attribute - label = STRING

- Contents - direction?, speed?, (bullet | bulletRef)

- Example

      <fire>
       <direction type="absolute">270</direction>
       <speed>2</speed>
       <bulletRef label="rocket"/>
      </fire>

Fires a bullet to <direction> degrees at <speed>. The labeled fire element is referred by fireRef elements.

<changeDirection> - Changes the direction of bullet |

- Contents - direction, term

Changes the direction of bullet to <direction> degrees in <term> frames. 1 frame is 1/60 seconds.

<changeSpeed> - Changes the speed of bullet |

- Contents - speed, term

Changes the speed of bullet to <speed> in <term> frames.

<accel> - Accelerates a bullet |

- Contents - horizontal?, vertical?, term

Accelerates a bullet <horizontal> in a horizontal line and <vertical> in a vertical line in <term> frames.

<wait> - Waits |

- Contents - NUMBER

Waits for NUMBER frames.

<vanish> - Vanishes a bullet |

Vanishes a bullet.

<repeat> - Repeats an action |

- Contents - times, (action | actionRef)

- Example

      <repeat>
      <times>100</times>
      <action>
       <fire>
        <direction type="absolute">220+$rand*100</direction>
        <bulletRef label="backBurst"/>
       </fire>
       <wait>6</wait>
      </action>
      </repeat>

Repeats the action <times> times.

<direction> - Specifies a direction |

- Attribute - type = (aim | absolute | relative | sequence)

- Contents - NUMBER

Specifies the direction in degrees.

"aim" type means that NUMBER is relative to the direction to my ship (The direction to my ship is 0, clockwise).

"absolute" type means that NUMBER is the absolute value (12 o'clock is 0, clockwise).

"relative" type means that NUMBER is relative to the direction of this bullet (0 means that the direction of this fire and the direction of the bullet are the same).

"sequence" type means that NUMBER is relative to the direction of the previous fire (0 means that the direction of this fire and the direction of the previous fire are the same).

<speed> - Specifies a speed |

- Attribute - type = (absolute | relative | sequence)

- Contents - NUMBER

Specifies the speed.

In case of the type is "relative", if this element is included in changeSpeed element, the speed is relative to the current speed of this bullet. If not, the speed is relative to the speed of this bullet.

In case of the type is "sequence", if this element is included in changeSpeed element, the speed is changing successively. If not, the speed is relative to the speed of the previous fire.

<horizontal> - Specifies the acceleration in a horizontal line |

- Attribute - type = (absolute | relative | sequence)

- Contents - NUMBER

Specifies the acceleration in a horizontal line.

If the type is "relative", the acceleration is relative to the acceleration of this bullet. If the type is "sequence", the acceleration is changing successively.

<vertical> - Specifies the acceleration in a vertical line |

- Attribute - type = (absolute | relative | sequence)

- Contents - NUMBER

Specifies the acceleration in a vertical line.

If the type is "relative", the acceleration is relative to the acceleration of this bullet. If the type is "sequence", the acceleration is changing successively.

<term> - Specifies a term |

- Contents - NUMBER

Specifies a term.

<times> - Specifies the number of times |

- Contents - NUMBER

Specifies the number of times.

<bulletRef> - Refers to the bullet |

- Attribute - label = STRING

- Contents - param*

Refers to the labeled bullet. This element is handled as the bullet element that has the same label.

Variables($1, $2, $3, ...) in the referred element are replaced with parameters in <param>. (First parameter replaces $1, second parameter replaces $2, ...)

<actionRef> - Refers to the action |

- Attribute - label = STRING

- Contents - param*

Refers to the labeled action. This element is handled as the action element that has the same label.

Variables in the referred element are replaced with parameters in <param>.

<fireRef> - Refers to the fire action |

- Attribute - label = STRING

- Contents - param*

Refers to the labeled fire action. This element is handled as the fire action element that has the same label.

Variables in the referred element are replaced with parameters in <param>.

<param> - Specifies the parameter |

- Contents - NUMBER

Specifies the parameter.

STRING - any string |

String for labels.

NUMBER - expression |

- Examples

      35
      360/16
      0.7 + 0.9*$rand
      180-$rank*20
      (2+$1)*0.3

Expression for specifying the number.

An addition, a subtraction, a multiplication, a division, a modulo, a bracket, and variables($1, $2, $3... for parameters, $rand for random value(from 0 to 1), $rank for the rank of game difficulty(from 0 to 1)) are available.

- | To BulletML page