What’s New in GB Studio 3.1

Thanks to GB Studio’s open source nature, many devs have already been able to dive into version 3.1’s features and bug fixes. Most users, however, opt to wait for an official release as opposed to building a pre-release on their own. Whether or not you’ve already tested it out, the latest version of GB Studio is out now so here’s a taste of what’s new and some of the more notable changes.

Improved Docs

Most of the information from previous releases has been retained, but perusing the contents is a lot easier thanks to a new table of contents layout, and tools like extending GB Studio’s functionality via Ejecting the Engine and using/creating Plugins are better detailed. There’s also handy references to GBVM which we looked at in previous articles, and it’s nice to have it all in one place.

Wait Frames

You can now define how many frames a [Wait] event uses as opposed to fractions of a second. As animation states are generated with frames, this is super useful when switching animation states for attacks or damage. This can also be used in other timer events like Camera Shake and Timers.

Deactivate & Activate Actors

This is similar to how Hide and Show Actors used to work, but Hide and Show now do not stop On Update scripts from running, so you’ll need to call this if you want that functionality. Having this separate is very useful for enemy behaviour and can also freeing up more CPU resources.

Actor Move Cancel

You can now cancel an actor’s movement on this event. Another extremely useful tool for enemy movement and behaviour.

Global Variables in Scripts

This one is huge. One of the most limiting factors of Scripts (previously known as Custom Events) is the fact that you could only place Variable References in them. Everytime you called a Script, you would have to define what Variable was being used for that script. Now, you can reference Global Variables directly in them. This can be super useful in many situations, like calculating player attributes (health, strength, etc) or tweaking the balance of the game and debugging. Adding functionality to a game later in development will be much easier too as you won’t have to select the variables in a script every time it’s called. I know this has been in the works for a while, so I’m really happy to see it available. You can also choose to set a number value directly as opposed to variable reference within a script.

Music and Sound

A whole slew of new improvements are available in the music and sound departments. You can now import WAVs, VGM/VGZ and  FXHammer (SAV) files to be played as sound effects (add them to the assets/sounds folder). The music tracker and piano roll have better interfaces, with simple improvements like shift clicking to select multiple notes, tool tips and the ability to copy and paste notes, it’s a much better experience for the user. Even something as simple as adding a play/pause action with the space bar goes a long way when using it. You’ll also find a new default set of instruments for a new template song from Tronimal.

GBVM

The GBVM script event is a lot easier to use now with both line numbers appearing to the left of the code and syntax highlighting. This makes coding more readable and easier to debug. The way scene symbols and references are now handled has changed (for the better). Whereas previously, GB Studio would procedurally generate tile bank data in alphabetical order according to filename, every scene’s tile and bank data is now named according to the scene. So if you have a scene named “waterfall” you no longer have to worry about adding an exclamation point to the front of it so it gets referenced as “_tileset_0”, you can simply refer to it as “_bg_waterfall”. What’s more, you can click the triangle on the top right of the scene to View GBVM Symbols, and rename them as you see fit. This also extends to the way Project Builds and Export Project Data is handled, with the GBVM and files clearly labeled in this manner making it much easier to debug on a compile error or learn how GBVM code is handled. You can also find references directly under the GBVM script event window for easy access/reference.

If you are migrating your a GB Studio project that used tile swapping heavily, you’ll notice this will break your previous code. Luckily, you can open your Project file in your favourite text editor and perform a find and replace command to solve this.

Clicking a symbol copies them to the clipboard for easy pasting into GBVM!

There are a few other changes to GBVM that are documented that allow for extra cool features like scanline interrupts in the overlay (dialogue can appear on top!). Those who have the knowhow can use these and other tools to build plugins in a much easier and more transportable manner thanks to the next feature…

Engine Plugins

Until now, if you had an engine improvement or change in behaviour you wanted to share or import into another project, you’d have to eject the entire engine and replace it, even if only one line or file was changed. Now Partial Engine files and Engine Plugins can be written in C or ASM and “merged” with your project on build. This also allows for C functions to be called directly from GBVM for potentially really advanced options. This has the potential to bring more lower level developers into the world of GB Studio or incentivize those who want to explore those tools. I’m super excited for what can be done with this in the future.

And More! 

To be honest, this update is massive, with many, many quality of life improvements and fixes. Actors On Update scripts can now run when they are off screen. You can check Actor’s Distance from other Actors, and use Loop For and Loop While events. There’s so much going on that it could feel overwhelming, but like previous versions – you don’t need to know all this to make a great game. What these more advanced features provide is a smoother experience within GB Studio and the opportunity for those who want to attempt more advanced techniques the ability to do so.

We really have to hand it to the entire GB Studio dev community who have been working hard at this release. A big round of applause goes to them.

If you’re interested in seeing all the changes, read the Changelog, otherwise download the latest GB Studio from itch.io and have fun!

Liked it? Take a second to support GB Studio Central on Patreon!