Game Build Attached Below
Context
For this week’s theme of ‘Play and Sound’, I built a voice-controlled 2D endless runner game in Unity and created a build for PC. In the game, the players have to use their voice as the input to control the character and move through platforms.
Method
I created the game in Unity and published a build for PC. First, I had to plan what sorts of sound I wanted to use and what would they control in the game. As I was building an endless runner game, I decided to use phrases to control the character. For the input, I used the microphone capabilities built in Unity and the keywordRecognizer class to understand what the player was saying. Then, I connected the keywordRecognizer class to the pre-defined phrases. I programmed each phrase to do a certain thing and checked if everything worked as I wanted it to. After that, I started building the level map and the UI elements to show the current and the high score. Once I had the game level done, I created a simple menu screen explaining how the game control works.
Response
As a response to this week’s theme, I created a game using Unity. In the game, the player has to use their voice to say certain phrases to control the character. The player has to jump through obstacles and platform gaps using their voice, to move through the platforms and score more points. The farther the distance the better the points. The phrases that are included in the game right now are ‘run’ to move the character forward, ‘stop’ to stop the player’s movement, ‘go back’ to move the character in the opposite direction, and ‘jump’ to make the character jump. While jumping through gaps along the way, speed also comes into play, to increase the speed of the character the player has to say ‘run’ multiple times.
This is an endless platformer game, where the user has to use their voices in perfect time to go through obstacles and cover more distance.
Reflection
I enjoyed creating a WebGL build and sharing it with others last week, so I knew I wanted to make a game and share that through WebGL again this week. And since I had not yet tried voice integration in Unity, I decided to give that a go this week. It was really fun to play around with how Unity deals with voice integration. I watched a couple of videos and read a bunch of documentation to figure out how it worked and how to integrate it into the project.
I knew I wanted to do something with the voice as an input for this week. The first thing that came into my mind was making a word game, where the words pop up on the screen and the player has to pronounce it to get points, but that didn’t sound like it’d be any fun. I remembered playing a game where you screamed to control a character and I had fun playing it, so I thought I’d try something similar. That is why I went with an endless runner game.
I enjoyed playing with the voice input in Unity to make it do what I wanted. It was a lot of trial and error to get everything working together but I loved the process and the result turned out to be fun and playable. This game does almost all the things I wanted to do when I started building it.The only thing that I was not able to do was build a WebGL build for others to play the game. That was because, WebGL doesn’t support the microphone as an input, which I found out at the end when building the game. So, I had to create a PC build to share it with others.