top of page
Free of Charge
About
Free of charge is a small coop game. It was programmed to be played on a Xbox Adaptive controller. In this game there is one player who controls the movement and jumping of the character while the other needs to combine the color and the shape to shoot targets.
Project Info
-
Role: Gameplay Programmer, gameplay design
-
Time: 10 days
-
Team Size: 8
-
Engine: Unity
-
Engine Experience: 11 months
-
Programming Experience: 11 months
Background
Free of charge was the first group project in Futuregames. This was a rather challenging project to get into due to several reasons. Biggest challange was the time, we only had a few days to create a prototype that was going to be presented in Tekniska Museet, and then one more week to finish it up. Second challange was the controller. We were supposed to use Xbox adaptive controller which only had two big buttons and small arrow keys. On top of it all, it had to be a coop game.
Tools - Spawner
Whenever I work in a team I like to create some tools for my teammates to use. In this project the tool I made was the obstacle\target spawner. The game randomly generates tiles and each tile randomly generates targets and obstacles based on the settings made by designers.
I combined target and obstacle spawner into one script bc essentially they do exactly the same which is spawn GameObjects.
Input and Controller
Controller Challenge
As I said previously, one of our challanges was the controller we had to use. Our playtests showed that controlling the character on arrow keys was not pleasant. We had to get creative with the controller.
That is where I thought of an idea to put three actions into two buttons:
-
Left button - First action
-
Right button - Second action
-
Double Press- Third action.
Problem
Unity didn't have support for combo input the way we needed. Unity supported having two keys to perform one action. Let me explain by taking minecraft as an example. In minecraft you can walk and sprint. You walk by holding "W" and sprint by holding "W" + "Shift". Unity's new input system supports that. It overrides Walk action with Sprint action. That is close to what we needed but not exactly.
​
We needed to have "W" as walk, "W" + "Shift" as sprint, and "Shift" as completely different action. That was not possible with Unity's input system.
Therefore, I had to come up with a fast solution how to achieve the desired input.
The goal \ outcome
Player 1 Controls:
-
Left button - Move Left
-
Right Button - Move Right
-
Both Buttons - Jump
Player 2 Controls:
-
Left button - Change Color
-
Right Button - Change Shape
-
Both Buttons - Shoot
How I solved it
In order to solve this problem, I utilised coroutines and event delegates.
When a button is pressed there's a slight delay (0.05 s) before the execution of the action. I made the delay to wait if the second button is pressed. Reasoning: it's nearly impossible for a human to press both buttons at the exact same frame.
​
Gameplay
Endless Runner
I've implemented endless running aspect. I spawn new tiles when hit a trigger of the next time and delete tiles behind the player.
I could improve the logic by implementing object pooling instead of spawning new GameObjects, but there wasn't much time.​
Movement
I programmed player movement. We didn't want the controls to be snappy, therefore I added accelaration and deceration parameters for my designers to play with. In addition to that I added settings to customize jumping.
Shooter gameplay
The second player (called shooter) had two responsibilities: combine Color and Shape of a projectile (we called it delivery) and shoot it.
​
When a player shoots it spawns a Projectile GameObject then supplies with the information about current shape and color that projectile applies to self.
​
I was the one who also programmed Targets. When a projectile hit the target they check if the projectile's info matches with the target's and based on that it gives different amount of points and ammo.
My team
Artists:
Emil Brax
Xander Jemide
Ka Sonn Tang
Designers:
Marcos Correa
Simon Håkansson
Ella Lopez
Jonathan Berkán
Programmer:
William Strand Paurell
bottom of page

