Game Jam 2021: Roll-a-Ball – 8/2/21

Itch.IO – LINK

Another year, another Game Jam, this time the theme is Roll-a-Ball and my team consists of:

Me – Jordan Robson – Programming, Level Design, Graphics, Menus, Music.
Will Langley – BLOG – Graphics.
Marcus Eley – BLOG
Jake Langley – BLOG – Playtesting and SFX.

To get started we made a board on Trello to assign jobs and make lists of assets we might need to create, it is important to note that this Trello board is very ambitious, but that’s what aiming for the stars gets you.

First things first, it was important to get the movement of the ball down, otherwise the game would not be playable, So I followed the classic Unity Roll-a-ball Tutorial for movement, this is a fairly simple script that is easy to build upon.

Following on from this, with our idea being an arena game where you have to avoid being knocked out, it was time to start looking into AI and movement, we tried a few various techniques but they didn’t exactly work how we would have liked it, and then we came across NavMesh.

NavMesh is a built in tool inside Unity that automatically maps the area for the AI to patrol in, the only thing we needed to do was set a target for the AI to chase and for that, we chose the Player. After loads of tweaking to the AI’s speed and movement, the AI became a fully functional part of the game, and the best thing about this is, it isn’t resource heavy at all.

Next, it was time to look at making the enemies spawn in at random intervals because having just one enemy would be too easy, I looked into a method called Co-Routines. Co-Routines are a function that runs automatically every time its called within a time limit. I also used a method called Instantiate which makes the script spawn a prefab every now and then. I used these same functions for a power ups script.

These two scripts also share another method which is OnDrawGizmosSelected(). This is a function for Unity that allows you to draw in-engine a surface area, as such, this can be used to mark what area the power ups and enemies can spawn in.

It was then time to make the power ups function, we decided to have four power ups, all used by either the player or the AI, however instead of the AI getting a Freeze power up, it would instead hit a little harder by adding more velocity.

This is fairly simple to do and it just requires component manipulation, which is alot fancier than it sounds. For the Giant power up, we had the balls double in size, for the dwarf power up in would be 4 times smaller, for the Speed power up, the move speed would increase by 50% and for the Freeze power up, the player’s rigidbody would become Kinematic, the enemy would gain more velocity. Each power up lasts for 8 seconds thanks to the co-routine I have set up.

I then programmed collisions so that they played a sound among players and enemies, I also added a background music track. This was done by having the background music play in the background of the main scene and then using a script to make it a singleton, a singleton essentially makes it so only one of these objects can only exist at any given time, so no matter how many times the menu is loaded, it doesn’t play the music on top of the same music that’s playing.

Other than a few UI scripts for lives and score count, as well as button press indicators, this was all the scripting complete, it was time to make the level look good. The stage originally was a blue square with a white border. This was good for testing because everything was easily visible, however it didn’t really scream Rollerball Royale, and so I made 4 cubes and positioned them into walls. I then made a ‘light rig’. The light rig is an empty game object with 4 different coloured lights as children, then by using the animator within Unity, I animated the rotation of the empty game object to make the lights move around, creating some kind of atmosphere. Finally, I took Will Langley’s logo of the original game name Rollerball Arena and placed it as a texture onto the center cube.

With the arena complete, it was time to start making some UI elements, We decided to go for a lives approach. You get knocked off the stage 3 times, and its game over, we also needed a score system, the score is based on how long you are alive multiplied by pi but rounded to an integer. Finally I felt like the game needed some input indicators so I made some key graphics to place onto the game.

I then wrote a script so that whenever what button is pressed, the graphic would shrink down in size before returning to its original size. This is what the game looks like with the UI.

I then went onto creating a main menu scene and game over scene, with limited time left of the GameJam, I haven’t included all the normal features you might see from a menu screen such as volume options.

With all that said and done, the game is functional and this is what it looks like in action!

What Went Well?

The things that I felt went well in this GameJam was the planning, programming and the level building, when we’re using Unity Teams it can be fairly difficult to see what people have changed and what assets have been uploaded but with this, there was no outside interference, we used it purely for playtesting purposes whilst I designed the level. I also think that Will and Jake have done good on their parts as well. Will’s logo and graphics he made bring the action to the game and Jake’s sound effect hunting adds that bit of life to the game.

What Didn’t Go Well?

In terms of the planning, we were a little over ambitious and didn’t make the most of the time we had, Marcus was going to be making some 3D assets but didn’t really come round to doing them, I also felt the communication between us all could have been a lot better. In terms of the programming, we spent so much time on AI but this is also a good thing, whilst it isn’t perfect, it is also very challenging, the issue was that the solution to our AI woes were built directly into Unity anyhow.

What Would I Do Differently?

I think in terms of doing things differently, I would probably be looking at making a roll-a-ball game that has obstacles you need to avoid and collectibles to pick up, however I wouldn’t want it to be like the October 2020 Game Jam where it was an infinite runner, maybe something like a labyrinth or a Kula World style game.

Leave a comment