Written By ·Latency
Bounty Bros. #7: Inputs & Elements
Dynamic map elements, generic controller configuration, and a gamepad standard re-mapper are now complete.
Wow! I did it! That was harder than I thought it would be, but here we are.
Over the last two months I've pushed to get three features implemented for Bounty Bros, all of which I have videos of below. First is a generic UI for mapping controls to your game actions. Second is an interface for fixing edge cases where a gamepad or joy-con isn't compatible with the standards used in our games. And third is the ability to add map "elements" in our map editor.
The majority of my time was spent on this control mapper and I think this was largely because it is a combination of the two things that have taken the most time in our experience so far, input management and UI.
The long name of this next interface is the "gamepad standard re-mapper". The reason for the creation of this is because there are controllers on the market that are not necessarily compatible with standards expected in our engine's gamepad input collector. What the interface does is simple, it merely has you input the button or stick direction that you see on the screen, bringing you through every input expected by our games. Those inputs are stored with the controller's unique identifier ( each controller has one builtin ). The game can then use this data to make sure that any control mapping you do, like in the video above, is the same for every gamepad. Now using this interface is rarely necessary since most remotes on the market are supported by our standard, but we intend to allow as much freedom as possible in how you play our games and never want to require anything proprietary to have fun.
Both of these are not aesthetically finished. I intend to update the fonts and icons sometime in the future. They're meant to be aesthetically generic but the functionality should be transferable to any chosen visual design.
And finally, I've gotten the first working "elements" into our custom editor. The map elements themselves are literally anything. Placing an element tile pretty much just adds a spawn point on the map with the data of the chosen element. More elements can be hot-reloaded into the editor if they are either scripted ( our engine supports Lua right now ), or the element is already hard coded in the game and you merely want a variation on the element's data. In the video below, although not functioning quite right as you'll see, the pot elements are scripted with Lua. The green and red pots both use the same script with different element data. The image source for these pots is stored in the element data which can be hot-reloaded, so if any pot color variations are desired these can be added without restarting the game.
I also changed how we handle the layers. Initially, I had a separate kind of layer for collisions and atlas tiles, now there are atlas, collision, and element tiles on every individual layer ( This is how Jumpy's editor was designed ). Having them altogether makes creating layers simple and easy to think about and allows you to choose any tool you want at anytime.
Between atlas, collision, and now the very dynamic element tiles, the editor should support everything necessary for our game. It definitely has some kinks, and needs some work to make it easier to tell what tiles are on the selected layer, but I do believe it has everything we need to make this game work. As we make more games, the editor will likely improve the more we use it.
It's hard to know exactly how things like the map editor will pan out in the future. As of now it is contained in Bounty Bros, but we do hope the development of such things will come to be major features of the game engine itself. We hope to make numerous games in numerous genres in the future, and so we are fully motivated to create as many features as necessary for the engine in order to enable ourselves to achieve this goal.
Written by, Latency: Lead Game Programmer at K-tech Studio