3 BulletML is the Bullet Markup Language. BulletML can describe the
4 barrage of bullets in shooting games. (For example Progear, Psyvariar,
5 Gigawing2, G DARIUS, XEVIOUS, ...) This module parses and executes
6 BulletML scripts in Python. All data structures in it are
9 More information is available at the BulletML homepage,
10 http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html, or the
11 python-bullet homepage, http://code.google.com/p/python-bulletml/.
15 from bulletml import Bullet, BulletML
16 doc = Bulletml.BulletML.FromDocument(open("test.xml", "rU"))
17 rank = 0.5 # Player difficulty, 0 to 1
18 params = [] # Initial variable settings, usually empty
19 actions = [a(params, rank) for a in doc.top]
20 bullet = Bullet(x, y, target=player, actions=actions, rank=rank)
23 for bullet in bullets:
24 bullets.extend(bullet.step())
28 For drawing, you're on your own, but Bullet instances have a number of
29 attributes that can be used to influence it.
33 from bulletml
.parser
import BulletML
34 from bulletml
.impl
import Bullet
37 VERSION_STRING
= ".".join(map(str, VERSION
))
39 __all__
= ["VERSION", "VERSION_STRING", "Bullet", "BulletML"]