3 This module parses and runs BulletML scripts. BulletML is a markup
4 language for describing complex bullet patterns in shooting games.
5 More information is available at the BulletML homepage,
6 http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html.
10 from bulletml import Bullet, BulletML
11 doc = Bulletml.BulletML.FromDocument(open("test.xml", "rU"))
12 rank = 0.5 # Player difficulty, 0 to 1
13 params = [] # Initial variable settings, usually empty
14 actions = [a(params, rank) for a in doc.top]
15 bullet = Bullet(x, y, target=player, actions=actions, rank=rank)
18 for bullet in bullets:
19 bullets.extend(bullet.step())
23 For drawing, you're on your own, but Bullet has a number of
24 attributes that can be used to influence it.
28 from bulletml
.parser
import BulletML
29 from bulletml
.impl
import Bullet
32 VERSION_STRING
= ".".join(map(str, VERSION
))
34 __all__
= ["VERSION", "VERSION_STRING", "Bullet", "BulletML"]