top of page
Search
cedarcantab

Danmaku using Phaser 3 (lesson 27 part 3): Stop & Go Bullets

And here are just a few more examples to illustrate what might be achieved with the Stop & Go bullets.


For example, by coming stop & go bullets that seek, with a very short stage2Time (ie stop time), with rotating 5-way creates below.


danmakuPattern.push({
    name: "RIGHT ROTATING 5-WAY WITH STOP&GO SEEKING BULLET",
    danmakuType: {class: "NWAY", count: 5},
    numberOfCannons: 8, // number of (pair in case of bi-directional danmaku) cannons
    cannonAngle: 90, // direction in which the primary cannon faces.
    cannonAngularVelocity: 120,
    numberOfShots: -1, // how many times to shoot the weapon in succession
    bulletType: {
      class: "NORMAL",
      speed: 100, // speed of bullets fired from cannon
      fireRate: 100, // time between bullets in ms
    texture: "oblongMID", frame: 0
    } ,
    bulletTransform: {
      type: "STOP&GO",
      stage1Time: 1500,
      stage2Time: 10,
      speed: 100,
      seek: true, target: player,// if this is set to true, always need target to be set in bulletType
      texture: "oblongMID",
      frame: 1,
      lifeSpan: 10000,
    },
  });


Or if you combine a rotating 5-way danmaku with curving bullets, with stop&go that turn into straight flying bullets, you get this.



danmakuPattern.push({
    name: "RIGHT ROTATING 5-WAY WITH STOP&GO BULLET",
    danmakuType: {class: "NWAY"},
    numberOfCannons: 5, // number of (pair in case of bi-directional danmaku) cannons
    cannonAngle: 90, // direction in which the primary cannon faces.
    cannonAngularVelocity: 30,
    numberOfShots: -1, // how many times to shoot the weapon in succession
    bulletType: {
      class: "NORMAL",
      bearingVelocity: -60,
      speed: 100, // speed of bullets fired from cannon
      fireRate: 150, // time between bullets in ms
    texture: "daggerMID", frame: 0
    } ,
    bulletTransform: {
      type: "STOP&GO",
      stage1Time: 1500,
      stage2Time: 1000,
      speed: 100,
      bearingVelocity: 0,
      texture: "daggerMID",
      frame: 2,
      lifeSpan: 10000,
    },
  });





This stop&go bullet feature certainly adds to the possibilities - already too much for my creative capacity to handle.


Here is the CodePen, for your perusal.




Comments


記事: Blog2_Post
bottom of page