General Big Projects Small Projects About Contact

Wanted Mario

The Goal

Make a game that uses an "alternative input" (Xbox Kinect, Tobii Eye Tracker, Leap Motion).
Work in pairs with a time limit of ~ 3 hours.

Challenges

First time working with any of these inputs.
Choosing a game and making it work within 3 hours.
Presenting it to the whole class.

Why This Game?

Instead of thinking of our own game, we decided to pick a childhood favorite of mine.
We needed something simple and this was the first thing that came to mind.
Since the original game is played using a touchpad, we could achieve the same but with an eye tracker.
Because we didn't have any time to waste, "Wanted Mario" minigame from "New Super Mario Bros" it was.

To play it, you will see a random wanted character on the right side.
Find it and stare at it for long enough to level-up and gain extra time.
Looking at the wrong one for long enough will decrease the time.
The white square shows where you are looking at.

With the mouse version, you just have to hover the mouse over the correct one instead of looking at it.

Project2_WantedMario

The Code

We have a class for the floating Heads; every Head contains info of which Head they are, how long the player has been looking at it, ...
When the game starts a random Head will be generated. Every level has an amount of Heads, so we take a random number between this amount.
A vector will be filled with random Heads in a for loop; if the index of the loop is not the random number, a random Head will ge pushed back that is not the same as the first generated Head.
When the for loop index hits the random number, we puch back one Head that is the same as the first gererated Head. This solves the problem of the Wanted Head being at the bottom or top.

Every frame we update every Head.
If the player is looking at it, the timer increases and when the timer reaches max, a boolean will be returned checking if the head is the correct Wanted Head.
If not, the player loses 5 seconds, if it is, the player gains 5 seconds and levels up.

Every level-up gives more Heads.
There is no end condition in this game.

The Tobii class returns a Point2f, this is the point the player is looking at.
We drew a white point on the screen to visualise this.

The code is made using a framework that we got from school, which uses SDL and is mostly written in C++.
The Tobii class was also given to us.
You can check the code for the eye tracker version on GitHub here.
You can check the code for the mouse version on GitHub here.

In Conclusion

After the 3 hours, the game turned out pretty great if I say so myself.
Because we used "Pair Programming" while making this game, the calibration of the Tobii was off during the presentation.
This made everyone hyped when eventually got one correct!

This project was made during the annual "Creaweek" in the workshop of "Alternative Inputs".
The "Creaweek" is a week after Easter Holiday where the first-years can follow some workshops.
These typically take about 4 hours, but excluding presenting the project and the starting explanation we only had 3 hours to work on it.

Again, my classmate Hanne Soubry helped out a lot. We perfectly optimized our first hour, she was doing the textures, while I started the coding.
For the last 2 hours, we alternated who was coding since there was nothing else left that could be split.

The sprites were taken from spriters-resources, obviously all credits go to Nintendo.

You can download the game below to play it yourself.
Keep in mind, do not touch anything and just run the .exe titled "WantedMario_...", deleting anything or moving something might break the game.
If you don't own a Tobii eye tracker, or don't have it correctly installed, don't expect it to work.
Everyone should be able to play the mouse version, so fret not!