Unity recently released a new Runner game template in the Unity Hub. This innovative approach to templates aims to help you prototype and build a shippable mobile game. In this blog, discover how the template was created from the developers who helped bring it to life: Steven Sauer, Steve Pastro, and Mehdi Hasheminia.
The three of us have spent most of our careers in professional game development, either as indie developers or working for studios on projects ranging from mobile games to AR applications. In fact, both Steves worked together before Unity at Kabam, helping to develop titles like Marvel Contest of Champions.
At Unity, our recent focus has been to build a new template that helps developers create a shippable mobile game. Based on our experiences and feedback from other game developers and publishers, we designed this template to help speed up prototyping and iteration for a runner game.
Read on to learn how we approached the development of this template.
One reason indie developers may not fully launch a game is because they often only focus on game mechanics. There are a variety of monotonous but required supporting systems that make a game complete and truly launch-ready. These base systems are “monotonous” because pretty much every game requires them. However, they can be a source of optimization problems in your product if done incorrectly or rushed.
We’ve built the Runner template to solve some of these systems for you, such as level sequencing, UI systems, menu flow, etc. These come built into the template so you can focus on adding visuals to make it your own.
Unity templates tend to be either learning tools or showcases for new features. The Runner template is the first template we’ve created where the thought process was, “This needs to be shippable and help our developers get from beginning to end.”
The Runner template is a performant starting point for anyone looking to rapidly prototype or ship a runner game. It comes with core game mechanics and essential features, including character controls, a track to run on, gates, collectables, etc. This means you can spend less time building basic subsystems and more time focusing on what makes your game fun and unique. The template is streamlined, since mobile games need to have a lower file size and take minimal CPU.
This template is not built for large AAA projects with intricate code – rather, it’s meant to be modified and personalized by all developers. For example, there are no assets included – everything is greyboxed so you can add your own content. Look at it as a starting point that you can build on.
Prototyping game mechanics to “find the fun” is an important part of game development. Experimentation and prototyping are also key to getting your game published. You may have to test a number of prototypes and mechanics before you have something that will pass the bar for publishing.
The template provides prefabs and in-Editor tools that enable you to experiment with ideas and mechanics, like different levels and obstacles, more efficiently. Once you nail the game mechanics, it’s just a matter of adding your own art and putting your own spin on the gameplay.
The template’s level editor tool helps you prototype levels more quickly. You can define many different features, like level width, grid size, and snap-to-grid. It even auto-generates the track for you with a customizable material. The snap-to-grid feature is especially handy for runner games, where objects need to be aligned perfectly. Plus, you can more quickly test and iterate on your level from the included Level Editor Scene. When you’re ready to see your levels in-game, just slot them into the Game Manager.
We’ve also built a clear and simple way to save and load levels. Because the data is serialized, all changes to prefabs are implemented automatically. This is because the template doesn’t save levels as prefabs – it saves them as data.
The Runner template enables you to build the game you want faster without writing a lot of custom code. You can leverage built-in systems or presets for character speed, camera angle, and terrain properties.
Feedback from mobile publisher Supersonic played a pivotal role in the template’s design. Some of the most common things Supersonic asks developers to iterate on include player control, player speed, and camera settings.
We took this feedback and created presets for the most commonly used camera angles and player speed.
The presets for player speed include “slow,” “medium,” “fast,” and custom, where you can define your own speed in meters or units per second.
Camera presets include “first person,” “behind,” “top-down,” “side view,” and custom. These presets position a camera and a “camera look at” which are offset from the player. You can adjust these values to get the exact camera angle you want.
We’ve also included controls for things like positional damping to give you a little bit of lag, as well as “lock camera position,” which stops the camera from following the player as they move across the screen.
Animation can be difficult to get right. The Runner template includes an animation controller available out of the box.
This animation controller blends between an idle stance, to walking, and then to a running animation. Animation speed is indicative of the character’s movement; the legs will move faster if they’re running faster, and they’ll slow down to a walk when appropriate. The animation controller is a starting point. You can swap out the animations or model as needed.
We’ve included prefabs to show game progress and menus to your players. These UI windows, including the “main menu,” “win screen,” and “lose screen,” are prefabs you can customize.
A menu sequence is also included. For example, from the main menu, a player might click on the start button, navigate to level selection, pick a level, and arrive at the first level. After this first level ends, they will see a UI showing that they won before being directed to the next level.
This menu sequence is scalable. You can change the gameplay mechanics, the scene, and the actual gameplay while maintaining the UIs and sequences that exist around it.
Settings are the last “monotonous” feature that helps polish a finished game.
The Runner template comes with several settings menus to give players options for how they want to experience the game. For audio, they can mute the music, change the volume, and enable or disable sound effects. There’s also a quality manager interface so players can adjust the quality to get more frames per second. If your game’s graphics or logic are a little heavy, reducing quality can help improve performance. These options enable players to get the most from your game.
The Runner template is a valuable tool for any developer looking to create a complete runner game quickly. With everything from game mechanics to level design, you can spend less time on tedious tasks and more time on making your game great. We hope you download and enjoy this template.
If you’re looking to use the Runner template to create a game that could get published, browse insight into successful runner games on Supersonic.com, where you’ll learn best practices and read stories from developers who turned their ideas into hits.
Have feedback on or questions about the Runner template? Connect with us in the forums.
Editor's Note (November 17, 2022): To navigate to the Runner Template, please ensure you're on Editor version 2021.3.4f1 or later.