Day 1 Character Controller…

Adrian Wilson
10 Unity MVPs in 30 Days…
3 min readMay 3, 2021

--

Endless runner, simple project could be done in a multitude of ways however we’re looking for basic, playable, and fun MVPs. Started off using the unity project design document.

The concept is as follows: You control a human (player) in this endless runner moving with WASD while space jumps and the left mouse button will attack. During the game enemies and power ups will appear from the top of the screen and the goal of the game is to get the highest score. There will be sound effects for jumping, attacking, enemies, damage, death and power ups. As the game progresses different types of enemies will spawn. The score will increase with power up collection, defeated enemies, coins, and time. Whenever the player loses their 3 lives the game is over. ( All of this is straight from Unity’s Project Design Doc.)

Basic stuff right? Step one, create the scene, I started with a cube for the ground, a capsule for the player, cubes for the enemies, sphere as the coins, and cylinder for the power ups.

Time to set up the player controller. I have experience with making a character controller as well as using the rigidbody system in unity, from my experience, I can’t ever seem to get the rigidbody system to be as precise as the character controller so I’ll be using the character controller to move. I added the character controller to the player and wrote a script to move it using WASD and jump with space.

Had some trouble with the jump as I was having difficulty figuring out when to apply gravity which made it so I kept resetting my y position and not getting any height on my jump.

Struggles:

This basic character controller took me an hour and a half to get functioning as I like it, this is part of the reason I feel my studying has been in vain. I also always struggle to make a game in scope, I’m sure I’m not alone here but I always want to add functionality that is beyond my skill range and would take too much time so I’m starting with basic and moving forward from there. Today was just a warm up!

Tomorrow’s goal:

On tomorrow’s list we will get into the enemy controller, make the coins / power ups collectable and set up the spawn manager for everything. This will take care of most of the games core mechanics, given everything goes well, we’ll also be able to give the enemies and power ups individuality.

Thank you for the read —

Adrian.

--

--