Deep Dive: What You Can Do With dot big bang 0.9.9

The recent release of dot big bang v0.9.9 added a mountain of new features to make developers’ lives easier. This post will run through some of the most significant and useful changes, and offer some information and tips on putting the new features to work. So let’s jump right in!

New Particles

The latest version of our particle system brings with it a host of changes. Not least, Cube Particles and fully shadowed particles, which add volume to VFX and other particles. Jump into this game to see some examples of the breadth possible with the new system.

Edit Whilst Stopped
One of the first quality of life features we’ve added is the ability to edit and preview particles whilst the game isn’t running. This makes it significantly easier to establish the look and feel you want in a straightforward manner.

Manipulate Time
We’ve also improved the properties on the Particle component adding a play and time property that let you control the playback of the system. The time property lets you pre-warm the system by specifying a start offset. There is also an additional randomSeed property that lets you specify a specific seed value to get reproducible results. This lets you achieve some pretty fun effects like using particles to create very cheap static foliage.

You can also further manipulate time to create repeating and mirroring systems, as this code snippet demonstrates:

// repeating, this code would run in tick
// with the play property set to false so time is advanced manually
const ps = this.entity.getComponentByType(ComponentType.ParticleSystem);
ps.time += this.game.frameDeltaTime;
if(ps.time >= ps.systemLifetime) {
    ps.time -= ps.systemLifetime;
}

// mirroring, this code would run in tick
// with the play property set to false so time is advanced manually
const ps = this.entity.getComponentByType(ComponentType.ParticleSystem);
const dt = this.game.frameDeltaTime;
ps.time += this.reversing ? -dt : dt;
if(this.ps.time >= this.ps.systemLifetime) {
    ps.time = ps.systemLifetime - (ps.time - ps.systemLifetime);
    this.reversing = true;
} else if(this.ps.time < 0) {
    ps.time = Math.abs(ps.time);
    this.reversing = false;
}

Other changes to note:

  • Two new types of particle, cube and billboard quads for more visual variation.
  • The faceCamera property only impacts point and quad particles.
  • spawnRate has been altered to make more sense calculated on systemLifetime from startNumParticles to numParticles.

Breaking Change!
In order to bring these changes the behavior of particles that are not faceCamera has been altered slightly. They are now located at the particle origin so will need to be reoffset in existing games. From a survey of our own games we didn’t find many instances of this so expect the impact to be minimal to community games.

Input API

In our newly released API version 0.1.2 we’ve updated our input API to be a little less cumbersome and offer convenience functions to easily tell whether a key, gamepad, or mouse button is pressed or released, and how long it has been held down. You can see examples of how this works in this example game. To save some time I’ll also reproduce the interesting details below.

const keyboard = this.game.input.keyboard;
const mouse = this.game.input.mouse;
const gamepad = this.game.input.gamepads[0];

// pressed
keyboard.isKeyPressed(Key.Spacebar);
mouse.isButtonPressed(MouseButton.Primary)l
gamepad?.buttons[0].pressed;

// just pressed (just gone down)
keyboard.isKeyJustPressed(Key.Spacebar);
mouse.isButtonJustPressed(MouseButton.Primary);
gamepad?.isButtonJustPressed(0);

// just released (just went up)
keyboard.isKeyJustReleased(Key.Spacebar);
mouse.isButtonJustReleased(MouseButton.Primary);
gamepad?.isButtonJustReleased(0);

// held time (time elapsed since pressed started)
keyboard.getHeldTime(Key.Spacebar);
mouse.getHeldTime(MouseButton.Primary);
gamepad.getHeldTime(0);

To use this new API you need to make sure you script is set to API version 0.1.2. You can set the API version you’re using in the Game Editor’s save panel:

Voxel Object Editor

The Voxel Object Editor has many quality of life changes in the pipeline, and v0.9.9 brings you the first few:

  • Display the object name in the editor to help make sure people name their creations!
  • The animation toolbar is now visible by default. Apologies to everyone that thought we had removed it!
  • You can now see the created/modified dates for all creations in view mode.

Game Editor

As well as a lot of bug fixes, we’ve added some great quality of life features to the Game Editor to keep game-making straightforward:

  • All resource browsers will now display recently accessed items at the top of the browser when you open it, making repetitive tasks and finding your regularly used stuff a lot easier!
  • All resources now have a ‘hover preview’ to show you an enlarged version of the image associated with them, making it much easier to see what it looks like.
  • All Voxel Object references have an option to view or edit the object in the Voxel Object Editor. Opening your objects for edit is one click away.
  • You can now preview all the sound effects and music in the Sound browser!

Transform Gizmo
We’ve added a pivot option to the transform tools that lives in the Transform Options panel on the right of the screen, as shown in the video below. It can also be accessed through the shortcut key ‘P’. This cycles through two possible pivot points:

  • The center of the entity or entities bounding boxes.
  • The origin of the entity or the averaged origin of a multiple selection.

What’s Next?

In the next few weeks we’ll:

  • Put out more improvements to the Voxel Object Editor aimed at making the Transform Gizmos as featured as those in the Game Editor.
  • Introduce a new ‘straight line’ mode to the Voxel Object Editor to make it super easy to do.
  • Continue improvements to our error messages from the engine.
  • Add the option to hide the in-game UI, making it much easier to get clean capture for videos, trailers, and social media.

If you’re interested in finding out more about what dot big bang offers developers, please visit our Developer Page! You can also chat to the dev team directly in our Discord, and follow the project on social media to stay up to date.

Author: Charles | dot big bang

Lead Community Engineer working on dot big bang

Leave a Reply

%d