top of page
Search
Writer's pictureAdam House

Rolling, Rolling, Rolling!

This isn’t the first time I experienced making an infinite runner game, I made two of them during one of my classes in 2019 and I have got them stored away in my hard drive somewhere. As you can see, I made a short little fun infinite runner where you must go as far as you can as a cricket ball measured in meters while dodging cricket stumps while also avoiding not to fall off the road. The project is inspired by some casual games found on the app store. Stick around to see unused confetti particles!

Cricket posts and ball (except for materials) were made by sports-Actions from the Unity store. The sky is made by Borodar from the Unity store.

WHAT I LEARNED: • Making random-sized confetti in one particle that explodes outwards. • Making the player's ball roll left or right with Input.GetAxisRaw(("Horizontal"). • Adding force to the player's ball rigid body going forward by adding a new vector3 within gravity and multiplying with its mass. • Freeze all the player's ball rigid body constraints with a single line of code rather than manually or multiple lines of code. • Made Confetti particle played without it being attached to the sphere, instead it follows the player without rotating and moves on the X transform position. This includes the same code for the camera following the player, including the Confetti particle they both use Gameobject.FindWithTag. • Using an if statement in an IEnumerator while constantly looping without causing any bugs or mishaps whatsoever. • Rather than measuring the player distance meters by transform. Position, it instead counts the average meters the longer you play the game by an IEnumerator, except if the game is over. • With Road Spawning: using a float for an index for each the cricket stumps and different roads while using an array to spawn new cricket stumps each with a road by vector 3 new position and using Random.range to instantiate new ones about 100 units away every time before the player reaches the end of the current road.

WHAT COULD I HAVE DONE BETTER? • Normally confetti should be used if you achieve something instead of the player dying, but I thought it would match the casual game tone while keeping it light-hearted, I could have used stars instead, but overall, I’m happy with the confetti, for now. • The Ball got a little slidy and difficult to control depending on how long you hold right or left, I will need to find a better way to make the ball easily left and then right or vice versa without it sliding off. • I could have made the cricket stumps appear far apart from each other, but I haven’t got a clue how I can separate them more apart by code yet. The road and cricket stumps spawning got a bit more complex than I thought, but still simple before I work on more complex level spawning games. • I could have made the game more exciting like sci-fi or something, but I didn’t want to overcomplicate things….for now.

OVERALL: It was a fun project to do, this won’t be the last time I try making an infinite runner. Along my game dev journey, I will look more into infinite runner mechanics, design, and games. There is a good chance one of my first commercial games may be an infinite runner, so it's good for starting a small game with randomly generated roads or levels while making a profit so I can build bigger games and repeat the process again.





3 views0 comments

Comments


bottom of page