Spacebar Battle — A Development Journey
This article documents the creation, design and processes of a small two player game with a unique mechanic. Where each section is a major change that i made to my game over time.
Here is a link to my Twitter and where you can download the game…
A while ago I created this small two player duel arena shooting game but never finished it. I lost interest though because it wasn’t progressing the way i wanted it to and I felt that I was lacking the skills and knowledge for the task.
The game was buggy, it looked terrible, the controls were bad and it just wasn’t fun. Although it had many flaws I still liked it because it had a very interesting concept. Both players had a linked firing button; one button controlled the firing for both the players. Once pressed a timer would go off and then fire the gun. The delay allowed for players to react to each shot but it made the combat a repetitive loop of firing, stopping and then reacting. However this was quite a unique and novel mechanic that I hadn’t seen before in an existing game and I liked its potential. I believed could have led to some interesting strategies and game play if done correctly. I felt that the game wasn’t living up to it’s potential so I left the project to hopefully one day pick it up again. Now that I have become more knowledgeable in game design, programming and using programs like Game Maker I aim to take this game as far as it can go.
Perfecting Player Movement
The aim of this game is to push your opponent out of the arena (room) this meant that solid player movement and control was key. Every single mechanic in this game comes back to the movement of the player ; colliding with each other moves you, firing the gun moves you and getting hit by a bullet moves you.
So it was paramount to get player movement and collision right because they had to be fluent, responsive and realistic. Although I wanted players to have responsive control of their ship I also wanted to player to feel like they are fighting against physics and their environment. I want the player to carefully think about their movements in the game so that they take priority on positioning . So In this interaction I focused on improving the player movement and collisions. To achieve this I took some inspiration from the classic retro game Asteroids and re appropriated how they handled player movement. In the game player movement has very little friction, meaning you keep your momentum even after you stop accelerating just like in space.
This makes player movement quite difficult and requires a high level of skill to master. This was desirable because I wanted my game to require skill and mastery to win. Although it was a massive improvement since the original game I felt that the player movement and collisions still needed some work. However I decided to leave it for now and improve it later so that I could move onto more pressing matters.
The Asteroids System
One major flaw with my game at the moment was the fact that it was too difficult to knock your opponent out of the arena. When I play tested the previous version I found that players generally reverted to just chasing each other around, sticking to the centre and then stopping every now and again to face each other and shoot. The game wasn’t progressing, no one was winning and there were no clear winning strategies. There needed to be more incentive to move so players didn’t stick to the centre and chase each other. To fix this I incorporated an asteroid spawning system. This system spawned asteroids that would collided with you and react when you they got hit by a bullet
This forced players to move away from the centre and added some strategy to the game because players could now use the asteroids as cover or as extra projectiles. However the game was still lacking because there needed to be more ways of knocking your opponent out of the arena. It was a good base but there needed to more environment pieces that players could use against each other. One player made a connection to the game Half Life and how the player uses physics in that game to cause damage so I might take inspiration from it in the future. I also made some minor alterations to collisions and movement in this version.
Textures, Aesthetics and Theme
Now that I made a clear base I decided to incorporate some more interesting graphics that fit my theme. My design of the ship again took inspiration from the game Asteroids and it’s triangular players. However I took it further by adding a nicer pixelated texture, reminiscent of classic retro games. The asteroids were created a little differently as they are actually derived from real photos. First I posturized the photo to limit some of the colours then I pixelated it be shrinking the size. They were very quick and easy to do but were also very effective.
I also needed to add some further visual effects like when object collide and when the bullets are fired but I decided to come back to that later. I also further improved collisions and the spawning of the asteroids in this version.
Sound Effects and Audio Design
Moving on from texturing I added some sound effects into this version of the game. Obviously you won’t be able to hear them here so you’ll have to play the game to find out. So far I added a laser gun sound, a rocket engine sound and a hit sound. To match my pixelated retro aesthetic I made sure that my sounds effects followed this theme.
I achieved this through the use of a retro effects synthesizer that I got online from this website (http://www.bfxr.net/). It’s a very powerful yet easy to use tool that allowed me to makes some pretty nice effects in very little time. I then edited them in Audacity when i wanted to make changes to the length or when i wanted them to loop effectively. I again drew inspiration from retro games like Asteroids when I was coming up for sound ideas because I wanted them to match my aesthetic. Audio is certainly not my expertise but I think I have done my game some justice for now.
The Firing Mechanic
In this version I made a drastic mechanical change to the way the firing system worked. Now there was no longer a delay between shoots allowing players to spray bullets at each other. This proved to be a welcome change by testing participants as they felt if was now easier to push your opponent out of the arena. The constant spraying of bullets also made each game more frantic and allowed for easier manipulation of the objects in the space. This then made more interesting game play, dynamics and strategy.
An interesting bug arose from this change when a player held down the space bar. This bug denied both players from firing, this seemed like an interesting mechanic so I decided to leave it in for now. However this new accidental mechanic needed to be designed further if I wanted to successfully implement it. I also fixed a game breaking bug where spawned asteroids would sometime clip into each other however they weren't flying in the correct directions.
The Mirror object and Mechanic Tweaks
In this version I made altercations to the spawning system. Besides fixing the direction bug for spawned objects I also implemented a new object called the mirror object.
This new object reflects the players bullets allowing for some unique manipulation of the firing mechanic. Players could now fire behind them when facing a mirror or even hit their opponent from an unexpected angle. Allowing for a more varied and interesting way of using your fired bullets. Now the game spawns asteroids and mirror objects at different rates and amounts. This system is pretty much perfect but I still would like to implement one more small change. I want objects to spawn further away from the room boarder so it looks like they are actually flying into the room but that’s not too important right now. I also thought about varying spawn rates and amounts as the game progresses but I’m not too sure how to implement that successfully yet. I also made improvements and tweaks to collisions and the behaviours of certain objects when they collide with each other.
The Design of the Title Screen and End States
This has to to have been one of the most drastic changes to the game so far however one of the most quickest and easiest. The most prevalent being the addition of the title screen and win/lost state which proved to be a nice addition to my game. It added elements of structure and progression to the game and increased it’s presentation immensely. Now the game has three states that it can end on, red winning, blue winning and a draw which is very difficult to achieve, each state having a different graphic.
Originally you pressed space to restart the game but i soon changed it to ‘r’ because I found that players were skipping over it unintentionally because of all the frantic button pressing. I intentionally enabled movement of the winner because I wanted that player to celebrate their win by flying around and shooting freely. I would like to take this system further by added some kind of round/point system but I thought I would leave that to last and come back to it depending on how much time I had left. However this new system was a good base to start with.
The Warning Mechanic
In this version I made some small changes that was suggested by one of my play testers. They thought it would be beneficial to players if there was some kind of indicator when players got too close to the boarder. So to fix that problem I added a warning sprite that would flash depending on how close you were to the boarder.
This added tension to the combat in the game because it increased the intensity of ‘clutch’ moments and come backs. This visual feedback also validated player action by eluding to the dangers of the boarder
Further Visual and Audio Effects
This version saw the addition of more visual and audio effects so that the game has more impact
First I added a looping buzzer sound that plays when you get too close to the boarder to coincide with it’s visual element. Further validating the dangers of the boarder. I added a small animation that plays when the gun is fired to so that it feels like it was weight and ‘punch’. I also added some minor screen shake when the two players collide. This screen shake is very light because i didn’t want it to be over powering. I felt that the game was frantic enough and didn’t need excessive shaking. I choose to use it when players collide because this is the only concrete state when both players are effected equally. I also made further tweaks to collisions by creating a custom mask for the player.
The Shatter Object
In this version I added a new space object to add more variation to the combat.
This new object is called the shatter object and it accumulates bullets as it gets shot. Once shot it starts expanding until it reaches it’s explosion point. Once it reaches this point it proceeds to fire out all of it’s collected bullets. This is then accompanied by audio and visual effects to further enhance it’s impact. Like the other object this objects follows the theme of manipulating the player’s bullet. I have designed this so that i can get as much out of pressing the space bar as possible. So that this inherently simple mechanic can now be used in many interesting, dynamic and creative ways. I also tweaked the collisions of the objects so that they are easier to move with the bullets, so players can actually ‘push’ them around
Changes to the GUI and User Functionality
In this version I added some small changes to the GUI to eliminate most text. To achieve the same communication with graphics instead of text was difficult to do but I think that i was able to accomplish it.
Instead of text I used animation and diagrams to achieve the same amount of communication. To controls I used a picture of a keyboard and highlighted to necessary keys for each player. To tell the player to press ‘space’ to play I animated a pressed spacebar and to show the player who won I animated a large flashing image of the winner. Hopefully this is able to communicate the same amount of information as the previous text. Also I changed the way you restart the game, now its back to space bar but instead of pressing it once you have to press it multiple times to get the game to restart. This is achieved with the use of Game Maker’s health bar function. Each press decreases the bar and once it hits zero the game restarts. This further adds to the use of the space bar and encourages rapid pressing from the user, its also a small game in its self.