It’s that time again: another development update! Tomorrow (or possibly later tonight) I will be pushing the next release, v0.3.2-alpha, to itch.io for those who are participating in Founder’s Access, so I thought I would discuss the major changes that I have been working on recently. These changes include some functionality relating to characters and a few new features to support sound effects.
Previously, characters were static when not walking since the game would just default to showing frame #1. In this next release, you’ll be able to specify idle animations for your character to remedy this and add a bit of life to your games! Taking advantage of this new feature is fairly straightforward. In the Voxel Editor, simply define a looping animation for your character with the name “idle” (all lowercase). That is all you need to do! The game will take care of triggering the idle animation when the character is not moving. This applies to player characters, NPCs, and enemies.
In the future, I plan to allow for more control over features like these (for example, allowing multiple idle animations that play randomly, or a special animation that plays after the character has not moved for a certain length of time), but for now I think this small change will have a lot of visual impact.
Another new feature relating to characters is the new “Movement Speed” property that can be adjusted in the Voxel Editor. By default, characters move at a rate of 30 voxels per second. It made sense to allow for varying speeds (for example, a human should cover ground a lot faster than a snail) and it was a quick change, so I went ahead and implemented this functionality to accompany the other character updates. The quad bikes below were adjusted to move at a speed of 45 voxels/sec and 80 voxels/sec.
Movement areas can now be defined for NPCs to restrict their movement. Previously, if an NPC was placed into a map, they could eventually wander anywhere on the map due to the nature of their random movement. This new feature makes use of the “group” functionality in the Map Editor. You can simply define a group of tiles and then, in the Properties dialog of a character, specify this tile group for the “Movement Area”. For example, you could confine a group of slimes to a certain area by the lake as shown below.
Once the movement area has been configured for each of the slimes, in the game they will only move onto tiles that are in the group that was specified for their movement area. This can be useful in a lot of situations! Another example could be a house where you want to limit an NPC’s movement to only tiles within that house (or even a certain floor within the house).
I am excited to say that a sound effects generator tool has been added to RPG in a Box! Originally, this sort of feature was quite far down the roadmap, but after I recently came across the sfxr tool that was created by Tomas Pettersson (drpetter.se). He was kind enough to make the source code for sfxr available under the MIT license, and I was able to fairly easily integrate the back-end code for generating sound effects into a UI that was modelled from his, including presets for general sound types such as explosions, pickups, etc.
Check out the video below for a preview of the Sound FX Generator. This video is just an overview of what can be created by only using the preset buttons. All of the sliders under the manual settings section can also be adjusted to create a wide variety of sound effects for your game. 🙂
To support the other new features around sound effects, a new “Play Sound” scripting function has been added. This will simply trigger the specified sound effect to be played once, and is useful for scenarios such as the player opening a door or a treasure chest. In a later version, I will be adding another function to support looping a sound effect.
I am also brainstorming other instances where custom sound effects could be defined, for example the “speaking” sound effect for an NPC, or even attaching a sound effect to an object’s animation so it is triggered whenever the animation plays.
If you’d like to import your own sound effects from the file system for use in your game, you can use the existing “Import Resources” tool on the main toolbar. The tool was updated to recognize WAV files in the selected source folder. Any WAV files selected to be imported will be automatically converted into the .smp file format used by the engine.
A couple of other updates worth mentioning involve changes to the Voxel Editor. Firstly, the view will now automatically switch between Front, Left, Back, and Right views if you continue to drag and rotate to the left or right with the right mouse button down. This should make building models a bit more efficient, as previously you would have to use the “View” dropdown to switch between these views.
Also, when importing from a PNG file into the Voxel Editor, the image will now be oriented based on the current view instead of always facing towards the front side. Eventually, I plan to add some additional options when importing PNG files, for example the option to specify a thickness of the model that is generated.
Thanks for reading! 🙂 The full list of changes included in the next release can be found below.
New Features:
Bug Fixes:
Other Changes: