Already fell into a diversion

Cecilia Kartwright
2 min readOct 28, 2020

So after my last post, I read a post by Mar McRae, that gave me an idea. Instead of continuing with my Unreal tutorials, I decided to try a small idea I came up with for Unity, considering I slightly more experience with the basics of Unity’s scripting and layout.

Mar McRae talked about learning how to set up a speed setting for a game, where A will lower the speed, S will increase the speed, and the code would keep the speed from ever going below zero.
Well, this immediately made me think of games such as infinite runners and the old Excitebike game for NES.

My project doesn’t entail a whole lot, and overall I only spent about an hour and a half toying with the idea, but in the end I wound up with a very basic framework for designing an infinite runner on top of.

I have a small white box, the player character, that always runs towards the right of the screen. The player can speed up with the S key and slow down with the A key. The player object’s script limits the players speed from ever lever leaving the range of 10 to 40, so you can go faster or slower. Also included is the ability to jump by pressing the Spacebar. I spent the bulk of my coding time tweaking the jumping so it feels quick and snappy, without feeling like you’re slamming the character into the roof, or floating back down like a feather while still moving so quickly horizontally.

For anyone interested in seeing the finished result of this little diversion, I have posted the build on my itch.io page: yinsho.itch.io/runner

--

--

Cecilia Kartwright

Transgender, socially akward, nerd. Interested in game development and Virtual Reality. Discord Server: https://discord.gg/5DvgMnA