Case Study: Creating Carnival Mini Games

What is Carnival Mini Games?

The Carnival Game is a set of fun mini-games merged into one game. This project was designed to strengthen my skill set in programming and improve areas that I am less experienced in – like 3D modelling.

The game includes two mini-games focused on one simple gameplay mechanic. My goal was to make these simple mechanics more interesting by adding depth and complexity. These games are aided by a shop that allows players to spend points earned in the games to purchase upgrades that change certain elements within them.

Each game can be seamlessly accessed through the main menu without the need to load a new scene.

Active Loading

This game is about timing. Small pegs make their way across the screen toward the trigger zone. The player must press E when the pegs are in line with the black or red blocks. Perfect timing is rewarded by awarding the player more points when the pegs are in line with the red blocks.

I felt that variation in the gameplay would keep things fresh. To do this, I created three different types of pegs with different speeds, and every 30 seconds the spawn rate increases, creating a higher chance to spawn faster pegs. This forces the player to be focused at all times to succeed.

Active Loading: Adding depth

During development, I realised that the game needed player choice to ensure that people with different skill levels would all find the game challenging. Before the game starts, the trigger zone can be moved – the closer it gets to the peg’s spawn point, the harder the game will be and the more points the player will get.

When thinking about how people will play this game, I discovered that nothing is stopping them from mashing the E button, forgoing the need to time their inputs. This trivialises the gameplay experience and runs the risk of making it too easy to complete, so I introduced a punishment for incorrect inputs, implemented in the form of a short cooldown timer that disables their input (indicated with a red light).

Active Loading: Challenges

The first step toward expanding my skill set was using Blender to create 3D assets. I started with a simple shape. Then created an arrow that would be used for the trigger zone to help players understand when to time their inputs. I used video tutorials to guide me through this process and in doing so, gained a greater understanding of how Blender works.

Arrow 3D model in Blender:

Where the Arrow was used in Unreal Engine

When programming this game, I ran into issues when dealing with multiple pegs in the trigger zone. The game was only capable of identifying and removing one peg, but with pegs having variable speeds, that simple system was not good enough. To remedy this, I created a system that adds a peg to an array when it enters the trigger zone, meaning that once one is identified and destroyed, the array will move down the list to the next available peg in range of the trigger zone.

Active Loading: Reflection

Working on this game, I managed to take a simple mechanic of timing a button press and turned it into an engaging mini-game with challenge and depth. My programming skill was challenged, which allowed me to improve. Also, I now have greater understanding of using Blender.

What would I improve? Adding sounds when hits are timed correctly; adding multiple lines at the same time, requiring the player to time two separate inputs; and doing more to confuse the player, like rotation of the screen.

Target Practice

This game is all about accuracy. The player controls a gun that fires projectiles, with the aim being to fire projectiles at distant moving targets. The targets are far enough away that the projectile will not hit the target instantly, so the player must time their shot to get precision hits.

These targets are made up of three rings, with varying points depending on accuracy.

Target Practice: Iteration

The original design of the gun was to have its movement be automatic as it pans from side to side, with the only interaction from the player being the press of the fire button. But this limited player interaction and challenge, since the targets could only be placed horizontally along the gun’s movement path.

After testing, more player interaction and challenge were required to increase player engagement. So I freed the gun from its predictable path and allowed it to be controlled by the player’s mouse movement. This took some time to perfect, but once working it was a significant improvement.

After the gun’s movement had been changed, I could increase the difficulty by making the target’s spawn points and movement locations more unpredictable. Since the player had more control over the gun, I could put more targets on screen at once, creating more challenges and reducing downtime.

Target practice: Gun Trouble

This game challenged my skills in Unreal Engine, because there was a lot I needed to learn before I could start the project. Creating the gun was challenging and forced me to consider multiple options.

When designing the gun to follow the player’s inputs, there were multiple methods for achieving the effect I wanted, however this took some time to get right. The first method was to get the gun to follow where the mouse was pointing. However, this proved flawed.

It would cause the gun position to snap into unintended positions. I tried using the mouse’s position on the screen instead, which fixed the issues displayed above.

Above is an example of the final gun code.

To get the projectile working, I learnt how to use a component in Unreal Engine called projectile movement. This component simplified the coding process, giving me the control I needed to achieve my desired effect.

Target practice: Reflection

This game taught me new methods of designing player input to allow for the gun to be controlled in the way I wanted, as well as learning new aspects of Unreal Engine. I learned the importance of iteration as gameplay systems are never going to be perfect on the first attempt. Improvements that could be made for the future are adding sounds to the gun and projectile; more varied target movement and size; and adding different types of guns that have their own unique strengths and weaknesses.

The Shop

The points that are earned in the two mini-games can now be spent in this shop. Items in the shop change the way the first two games are playedm by augmenting certain statistics.

I wanted the shop to be present within the game world, and not just a static menu, so extra work was needed to ensure a good user experience. To make sure the player knows which item they currently have selected, the camera focuses on it and the item is raised to highlight it. To provide proper feedback when an item is purchased, the button text and colour changes.

Code used to raise and lower shop items:

Shop: Items Effect

The first of the upgrades is for active loading, this reduces the speed of the pegs which makes it easier for the player to get perfect hits leading to a higher score. To give visual reinforcement a weight on the end of a chain is added to all the peggs to give the impression they are being weighed down.

The other two are for target practice, the first increasing the gun’s projectile speed which means the player will not have to lead their target as much as before. This comes in the form of a battery pack that appears on the side of the gun when purchased.

The other is a scope that doubles the points gained when hitting targets. The scope appears on the top of the gun when purchased. In future updates, I would like this upgrade to create a crosshair on the screen to aid the player’s aim.

Shop: Designing the Items

Creating these upgrades required me to learn new concepts in both Blender and Unreal Engine. Each of the models used in the shop has been created in Blender. It took a lot of trial and error to create the models for the shop and in the process, I gained a greater understanding of 3D modelling and manipulating objects in Blender.

Battery Pack 3D model in Blender

Scope 3D model in Blender

Getting the chain physics to work correctly was a new process for me and it took patience to make sure it behaved as intended. I learnt how to string multiple physics objects together using Unreal’s physical contains component.

Testing the physics in Unreal Engine.

Shop: Reflection

I believe that the aim of the shop has been achieved by providing players with upgrades to keep the mini-games feeling fresh. I gained valuable experience in Blender.

I feel that this shop would be improved by adding more upgrades that introduce new concepts for the mini-games, as well as adding cosmetics to give the player a form of personal expression.

Comments are closed.