Danmaku made by Haxe

To build a bullet hell / roguelike game we need both dungeon generator and bullet pattern engine. In Tunneling Maze Generator, we build a framework for dungeon generator. Now we need to decide what kind of bullet pattern engine to use.

AFAIK, there are many types of bullet pattern engine. BulletML which is used by Enter the GungeonTouhou Danmakufu which can make Touhou Project-style game; and other engines like STGBuilderLuaSTGDanmakU .etc has their own followers. In some way, all these engines use fire-subfire model. In this model, each shot is usually defined by:

  1. parent’s properties (position, velocity, acceleration, …)
  2. movement function
  3. initial properties

However, we found Touhou Danmakufu has more reliable tutorials and readable document to explain how API works. Also, many people share their works on BulletForge which becomes excellent example gallery.

Besides it’s own API set, Touhou Danmakufu has Task syntax witch can start a Coroutine to perform asynchronous shot movement method. In Haxe, asynchronous programming can be implement by yield macro. A bullet pattern function will be divided into multiple code snippet and stored as an iterator. By this idea, we can simulate Touhou’s boss stage easily. Following scene is our clone pattern for 東方天空璋 stage 3 :


By this engine, we could systematically create more bullet pattern. Hope various kinds of patterns can bring more fun to players. 。:.゚ヽ(*´∀`)ノ゚.:。