Endlessrunner Course

Learn how to make an infinite scrolling platform game in Unity with C# working through all stages of game development.

Last updated 2022-01-10 | 4.7

- How to use the Unity Mecanim system to create and trigger animation states on a character.
- How to design a graphical user interface with a main menu
- pop-up windows and programmable buttons and sliders.
- How to program an infinite scrolling 3D platform world.

What you'll learn

How to use the Unity Mecanim system to create and trigger animation states on a character.
How to design a graphical user interface with a main menu
pop-up windows and programmable buttons and sliders.
How to program an infinite scrolling 3D platform world.
How to implement background music and sound effects.
How to create and spawn particle systems for magic spells
explosions and special effects.
How to program a lives count and scoring system that saves the state.
How to build an entire casual game from scratch.

* Requirements

* A good understanding of C#.
* A basic understanding of the Unity Game Engine.

Description

Who doesn’t love a good endless runner? Did you know it’s the genre that reigns from the early platform games of Donkey Kong and Mario Brothers? From Canabalt to Temple Run to Subway Surfer, this casual game has been the pastime of many a gamer with a mobile device and a few moments to while away. But did you know there’s quite a bit of work that goes into such a game? Of course the scenery is repetitive, but did you know that it has to be constructed with pieces of the environment that can always fit together and be procedurally placed?

In this course, Penny will take you through all the stages of game development with C# and the Unity Game Engine using her internationally acclaimed Holistic teaching style and expertise from over 25 years teaching, researching and writing about games. Throughout the course you will follow along with hands-on workshops designed to teach you these core programming concepts that will take your games to the next level.  All assets including models, animations, textures and sounds are supplied.

The objective of this course is to teach you all you need to know to make your own game!

Learn how to program and work with:

  • Character and World Models

  • Character Animations

  • Procedural Infinite World Generation

  • Graphical User Interfaces

  • Pick-ups

  • Particle Systems

  • Background Music

  • Sound Effects

Content and Overview

The course begins with setting up the character and applying animations in the Unity mecanim system, before writing code to control them.  It continues step-by-step, going through the development of an infinite scrolling 3D world, including the use of the pooling and singleton design patterns. In these sections, obstacles such as fire and walls are added which the character is programmed to jump over and destroy. Thereafter, a graphical user interface (GUI) is put together in Unity's canvas system, where you will learn about alignment, fonts and screen resolutions as well as how to program button presses, sliders and create pop-up windows.  Next, particle systems are investigated as a means of providing some special effects and several are constructed from scratch for magical spells and explosions.  Finally, background music and sound effects are covered, as is controlling the sound of each from the GUI.

What students are saying about Penny's courses:

  • She is the best teacher ever in this platform.

  • Most instructors are very smart people. Some are good at teaching and some are not. Penny is great at describing complex concepts without going down a dark cerebral rabbit hole that so many instructors feel obligated to do. It's like they need to demonstrate their knowledge by explaining every tiny aspect. Penny does not go there. She explains things clearly but does not overwhelm the student with more than they need to know. There is only so much most people can absorb in one sitting. You need to study, then you need to practice and then more study. I have taken most of her classes and I recommend them all.

Who this course is for:

  • Beginner Unity students.
  • Intermediate users of Unity interested in working through an entire game project.
  • Game development students of all ages.

Course content

9 sections • 43 lectures

Introduction Preview 02:21

This lecture provides a brief overview of the content we will cover in this course.

Join the H3D Student Community Preview 01:26

H3D has a bustling online student community.  Here's how to get involved.

FAQs Preview 00:14

A list of frequently asked questions by students as well as important information about how to proceed with the course.

Animating the Player Character Preview 19:33

In this lecture you will learn how to setup the initial player character and control a jump animation with the space bar and mecanism system.

Casting a Spell Preview 16:54

In this lecture you will add the magic casting animation onto the character and learn how to blend it with the run animation.  Following this the arrow keys will be programmed to turn the character 90 degrees.

Quiz 1

This quiz will test your knowledge of the character setup and animation process.

Platform Model Setup Preview 18:41

In this lecture we will examine the setup of models and the requirements for creating a procedurally generated environment.

Turning Corners Preview 19:34

In this lecture we will take a look at how to turn corners in generating the procedural platform world.

Creating a Platform Pool Part 1 Preview 15:20

In this lecture we will construct a pool to restrict the number of platforms that are available to the world generation system.

Creating a Platform Pool Part 2 Preview 07:25

In this lecture we continue the development of the object pool and get it working with the environment generation.

Scrolling the Environment Preview 19:59

In this lecture we will add code to scroll the environment to prevent infinite position calculations and add physics constraints to the player character and platforms.

Scrolling in the Y Preview 13:14

In this lecture we will add Y Scrolling to the platform world and get each platform ready for infinite world creation.

Spawning Platforms on the Move Preview 19:18

In this video you will learn how to spawn platforms as the world scrolls beneath the player character.

The Bounce Dilemma Preview 05:16

In this lecture we will examine an issue that can cause a logic bug to rear itself and have platforms spontaneously disappear.

Adding a T-Intersection Preview 19:22

In this lecture we will deal with adding in the complexity of a T-Intersection and turning corners.

Fire Obstacles Preview 18:22

In this lecture we will add a particle system representing fire into the environment that will trigger the death animation on Astro.

Adding Random Fires to Platforms Preview 17:53

In this lecture we will program fires to spawn on random platforms.

Building a Wall Preview 08:50

In this lecture you will learn how to create a wall obstacle that can be exploded apart.

Generating Magic Preview 16:42

In this lecture you will use the magic collision with the wall to break the bricks apart.

Walled Platforms Preview 12:16

In this lecture you will learn how to create prefab platforms with walls on them.

The Graphical User Interface Preview 10:22

This lecture covers some theory pertaining to graphical user interface design and gives a simple layout that we will apply to the endless runner game.

The Main Menu Part 1 Preview 19:58

In this lecture we will begin constructing the main menu and discussing GUI items.

The Main Menu Part 2 Preview 11:07

In this lecture we will complete adding the buttons to the main menu and program the play game button to switch into the game scene.

The Main Menu Part 3 Preview 14:46

In this section we will examine how to setup the quit button in the game scene to return to the main menu as well as how to quit the application.

Creating Menu Popups Preview 18:13

In this lecture we will tidy up the layout of the buttons and create popup windows to house more information.

Finishing Popups Preview 15:29

In this lecture we will complete the programming of the popup windows and make the code more flexible.

Animating Coins Preview 17:22

In this lecture you will learn how to add an animated coin into the environment and make platforms featuring them.

Picking Up Coins Preview 19:59

In this lecture we will add colliders to the coins and make a score that gets updated when Astro runs over a coin.

Coin Resetting Preview 06:17

In this lecture we will address the issue of the destroyed coins not being reset on the platforms after being destroyed.

Programming Lives Count Preview 16:19

In this lecture we will begin adding the icons representing the player's lives to the GUI and start coding the properties to count the player deaths.

Displaying Lives Preview 15:27

In this lecture we will complete adding the code to count the player lives and display them in the GUI.

Statistics Preview 17:44

In this lecture you will learn how to record the score and highest score and display on the statistics popup screen.

Fog Preview 12:47

In this lecture we will be discussing Fog, what it's settings are and how to use it.

Explosions Preview 16:04

In this lecture we will construct a magical particle system explosion.

Exploding the Wall Preview 12:11

In this lecture we will go through the steps to add the explosion to the end of the magic action where the cast spell hits the wall.

Adding Music Preview 18:40

In this lecture we will construct the options settings with volume sliders and hook them up to control a looping background track.

Saving Sound Settings Preview 18:34

In this lecture we will examine how to save the sound settings and apply volumes to sound effects as well as music.

Sound Effects Preview 09:50

In this lecture we will fire off some simple sound effects to compliment some actions in the game.

Syncing Sounds with Animation Preview 09:39

In this lecture you will learn how to synchronise sounds to play in the middle of animations.

Animated Pickups Preview 19:09

In this lecture we will add a floating up score and particle effects to the coin pickup system.

Final Touches Preview 15:27

In this lecture we will add a few extra bits and pieces to improve the final game quality.

Some Final Words from Penny Preview 01:39

A course wrap-up by the instructor.

Where to Now? Preview 11:16

Want to continue your game development journey?  Here's some advice.