X-Git-Url: https://git.yukkurigames.com/?p=python-bulletml.git;a=blobdiff_plain;f=bulletml%2F__init__.py;h=8ab4ec265f87601ea47515238039c76fdb8a214b;hp=f06d0868dd78b5a6b79f05b52eaad2c49e739299;hb=a14b854db961815ff29962285bd4f632b98b98d9;hpb=41f351faf847cb5bc88c7ff5fc6c21bafc9aa5ee diff --git a/bulletml/__init__.py b/bulletml/__init__.py index f06d086..8ab4ec2 100644 --- a/bulletml/__init__.py +++ b/bulletml/__init__.py @@ -1,26 +1,32 @@ """BulletML parser. -This module parses and runs BulletML scripts. BulletML is a markup -language for describing complex bullet patterns in shooting games. +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. +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")) + player = ... # On your own here, but it needs x and y fields. 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) + bullet = Bullet.FromDocument(doc, x, y, target=player, rank=rank) bullets = [bullet] ... for bullet in bullets: bullets.extend(bullet.step()) - ... -For drawing, you're on your own, but Bullet has a number of +For drawing, you're on your own, but Bullet instances have a number of attributes that can be used to influence it. """ @@ -28,7 +34,7 @@ attributes that can be used to influence it. from bulletml.parser import BulletML from bulletml.impl import Bullet -VERSION = (1, 0) +VERSION = (0, 1) VERSION_STRING = ".".join(map(str, VERSION)) __all__ = ["VERSION", "VERSION_STRING", "Bullet", "BulletML"]