Alpine Shred: Postmortem


ALPINE SHRED: POSTMORTEM

This week, I released a new arcade game I created called Alpine Shred and I wanted to share a little about my experience with its development.

Motivation

Originally I was not planning to make this game, in fact, I had other projects that I was planning to work on and ended up choosing to do this instead. Why? Well, besides the inherit joy of just cancelling existing plans, I just felt a surge of interest to develop this small idea for a smooth and weighty snowboard game that ended up taking a bit longer than I anticipated.

During the Synty Assets Sale a couple weeks ago, I saw their Snow asset on sale for $5. Its a small asset with just a couple characters, some snowboards and skis, and a handful of props for ski resorts. I really enjoy snowboarding in real life, and I thought it would be really cool to make a game about it, but it seemed very difficult and I didn’t have any concrete ideas. Then, I just so happen to be browsing the Unity Asset Store and saw a prototype for a downhill skiing game and it clicked! I could make a downhill snowboarding game with those assets! So I did!

Prototype

Of course I wanted to jump right into playing with some pretty and colorful assets, but I held myself back and began developing a greybox prototype of the game first. This step is important to make sure that you get a fun gameplay experience without getting bogged down with the art and vfx implementation details.

After about two afternoons of prototyping, I ended up with a fun little prototype of a colorful dodging left and right as cylindrical obstacles fly towards it. The actual “downhill” aspect of the game is just a matter of perspective, in reality the player never moves from his spot, only going left and right, while the obstacles move past him.

At this point the gameplay was feeling fun and responsive. The player had a smooth movement curve as it moved left and right, and a smooth trail following behind it to emulate the smooth and continuous nature of snowboarding down a snowy hill.

Art Pass

Now that the prototype was working in greybox, it was time to give the game an art pass. I had a number of elements in the game that were currently represented by primitive shapes that needed to be swapped for 3D models. The first was the player. I swapped out my colorful cube for a snowboarder riding a snowboard. Unfortunately, I couldn’t find any good free animations for snowboarding, so I chose to just place my snowboarder into a static pose that looked like snowboarding, and then I would manually animate turns by rotating the model. I also swapped the obstacles out for trees and the ground out for actual snow. In order to add some variation, I threw some special models into the list of obstacles so that some of them would be rocks, snowmen, or even Christmas trees! I also added a bunch of forest decorations on either side so that it really looks like the player is whipping down a snowy mountain!

User Interface

After filling in placeholder shapes with actual artwork, I needed to add some UI to the game. For the gameplay scene, I added a score counter, a time counter, and a health counter to the top of the screen. The score counter would go up by one point for each tree you successfully avoid. I did this by adding an invisible trigger box behind the player that only captures trees the player didn’t hit first and incrementing the score. The time counter counts how long the player has been going downhill for. As time increases, so does the difficulty. I added an asymptotic equation to calculate how frequently obstacles spawn as well as how fast they move. The longer you survive, the more objects you will have to avoid and the faster they will move! Finally the health counter counts how many obstacles you’ve hit. If you hit too many and your health drops to zero, game over!

Things are coming along, but of course, every good game needs a good main menu! I created a new scene in Unity for the main menu and started building a snowy mountain scene as a 3D backdrop for my menu. I placed my snowboarder in the foreground with his board propped up next to him, and a snowy mountain range in the background, including all the nice little props from my asset pack such as snow blowers, snowmobiles, orange fences, and of course, and animated ski lift! It still felt like the menu was missing some excitement though, so I decided to use a 3D UI with a multi camera setup to give the menu some slick movement! Now all the menu boxes would hover in 3D space and really pop, and each of the submenus would exist in different places within the menu scene, and the camera would pan between them cinematically as you navigate between them!

To complement the main menu, I also had to implement a few additional functionalities. I needed a way to save the player options, so I created a basic PlayerPrefs saving system to keep track of those. I also decided that the game needed a scoreboard, so I added score tracking to the gameplay scene, and a new menu that would list all of the players scores in descending order. The player scores seemed a little too sophisticated to save to a PlayerPref, so I wanted to serialize it. Normally I like to write my own data serialization, but since I had recently purchased the asset Easy Save off the Unity Asset Store, I decided to give that a try. Surprisingly, their sales pitch was spot on, it was extremely easy to use!

Audio Pass

At this point, I’ve got a working main menu with options and scores, and a working game! So I must be almost done right? Wrong! Currently my game is still completely silent. Audio is one of those aspects of game development that can be easily overlooked, but it can also bring your game to life like nothing else. I personally find that this step takes a long time too, as it usually involves me scouring the internet to find free sounds and music that I can either use as is, or modify in Audacity.

For the menu music, I actually chose to try out an A.I. music generator. Menu music is usually pretty easy as it only needs to be relaxed and atmospheric. Not a lot of stuff is usually happening in the menu, so you don’t need to project a lot of emotions. This made it really easy for me to generate a pleasant sounding lo-fi music track for the menu and plug that in. The gameplay music was much harder. I needed something that would not only fit the theme, but convey energy and excitement of snowboarding downhill. I ended up settling on a song called “Return of the Snow Queen” by an artist on Newgrounds called Phyrnna. For the sound effects, it wasn’t to hard to find all the beeps and boops I wanted, but I struggled a lot to find good sounds for the snowboard sliding through the snow. Most snowboarding sounds are either highly distorted with wind drag if they are recorded in person, or costed money. Luckily I managed to find a good audio clip for free of a skier and chopped it up in Audacity into an idle loop for when the player was coasting, and a turning sound for when the player makes sharp turns in the snow.

Last Minute Additions

So at this point, the game was finally done…except I wasn’t completely satisfied with it. This game had been a spontaneous decision to make, and it was never meant to be extensive, but it just felt wrong to leave it this empty.

First of all, the gameplay needed a little more to do. Just dodging the trees was fun, but it felt too shallow. I decided that the player needed something to aim FOR as well. So, I added in pickups that would spawn randomly that the player can try to swerve around and collect. These would be stars that would give the player additional points, or health pickups that would grant them additional health.

I also felt like I needed to learn something new from this game. So far, I hadn’t really done anything that I didn’t already know how to do and I wanted to feel like I was improving my abilities with each new game. So the two new things I decided to learn for this game were shaders and online leaderboards.

Making scene transitions in Unity isn’t too hard, and there are lots of ways to do it without shaders, but if you want a transition that opens and closes on a custom mask, you have to mess with some shaders. So, I followed a few guides and managed to put together a circle transition that would open on enter and close on exit. It has a lot of potential for other shapes and effects and I plan to play with it a lot more later.

The second addition was online leaderboards. I already had scores in the game, so I figured why not stretch my knowledge and try to implement Unity Gaming Services Online Leaderboards so that players can compare with each other. It took a little bit of work and reading the documentation to get it working, but I finally managed to extend the original scoreboard with an online portion that shows either the top players in the world, or the 10 players surrounding your best score. Of course, I didn’t forget to create an accidental infinite loop that spammed requests to Unity’s servers and got me rate limited first :).

Possible Improvements

Alright, now the game is actually done! For real this time! But, there are still a few things that I didn’t think were completely perfect, and I might come back in the future and give them some improvements.

The first thing I was a little unsatisfied with was the player controller. The lack of animations does inhibit the feeling of a smooth snowboarding experience a bit and make it feel kind of stiff. Also, the smooth turning and rotation feels like its just not quite right, and could probably use a little bit of tweaking.

The other main improvement that I would like to create would be Object Pooling. There are a lot of object spawning and delete operations going on with the obstacles and background, so I feel like this would be a great opportunity to use Object Pooling to significantly increase performance. This is a pattern that I haven’t experimented with much, so I will probably come back to this soon to use as a learning experience.

Conclusion

Overall, I’m glad I made this game. Sometimes, you just have a gut feeling that you need to make something, and you just need to set aside your other plans and follow your heart. This game ended up being just as fun to play as I hoped, and it even offered opportunities for me to learn some new valuable skills.

If you want to try the game yourself, you can play it here on my Itch.io page, or view the source code on my Github.

Thanks for reading! I hoped you learned something yourself, and I hope to catch you all in the next one! Ciao 

Files

AlpineShred_v1.0 47 MB
May 15, 2023
AlpineShred_v1.0 47 MB
May 15, 2023
AlpineShred_v1.0 56 MB
May 15, 2023

Get Alpine Shred

Leave a comment

Log in with itch.io to leave a comment.