X-Git-Url: https://git.yukkurigames.com/?p=python-bulletml.git;a=blobdiff_plain;f=bulletml%2F__init__.py;h=addc0fee1bce133a4c49fdd890b9bb9a6ecfbb63;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hb=70d25195d561d8b5d3126c6bbac0ecad2a502f06;hpb=2e1e64f1f8076dd21a5ea1e7f8af6dbb74946d57 diff --git a/bulletml/__init__.py b/bulletml/__init__.py index e69de29..addc0fe 100644 --- a/bulletml/__init__.py +++ b/bulletml/__init__.py @@ -0,0 +1,43 @@ +"""BulletML parser. + +BulletML is the Bullet Markup Language. BulletML can describe the +barrage of bullets in shooting games. (For example Progear, Psyvariar, +Gigawing2, G DARIUS, XEVIOUS, ...) This module parses and executes +BulletML scripts in Python. All data structures in it are +renderer-agnostic. + +In addition to the standard BulletML XML format, this module supports +an equivalent YAML format. See bulletml.bulletyaml for more details. + +More information is available at the BulletML homepage, +http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html, or the +python-bullet homepage, http://code.google.com/p/python-bulletml/. + +Basic Usage: + + from bulletml import Bullet, BulletML + doc = Bulletml.BulletML.FromDocument(open("test.xml", "rU")) + rank = 0.5 # Player difficulty, 0 to 1 + params = [] # Initial variable settings, usually empty + actions = [a(params, rank) for a in doc.top] + bullet = Bullet(x, y, target=player, actions=actions, rank=rank) + bullets = [bullet] + ... + for bullet in bullets: + bullets.extend(bullet.step()) + + ... + +For drawing, you're on your own, but Bullet instances have a number of +attributes that can be used to influence it. + +""" + +from bulletml.parser import BulletML +from bulletml.impl import Bullet + +VERSION = (0, 1) +VERSION_STRING = ".".join(map(str, VERSION)) + +__all__ = ["VERSION", "VERSION_STRING", "Bullet", "BulletML"] +