
Explore Unity fundamentals, editor, game objects, and C# scripting to build the infinite runner. Implement on-the-fly level generation, movement controls, physics, coins, speed booster, and a score and leaderboard system.
Install Unity Hub, download the editor, and manage versions for your projects; sign in to create an account and choose a version for Android and iOS.
Initialize a new unity project set to 3D, then explore the unity editor UI, including the scene view, hierarchy, project window, inspector, and basic navigation controls.
Explore basic object manipulations in Unity: select in the hierarchy or viewport, use move, rotate, and scale gizmos with q w e r, and edit transform in the inspector.
Discover how Unity uses component-based game objects, with transform, mesh filter, mesh renderer, and colliders, to build 3D primitives like cubes and spheres with materials.
Attach a Rigidbody and Collider, create and attach a C# script, and use Start and Update to log activity while moving the object along the z axis with transform.position.
Move objects by adjusting transform.position with a vector3, and scale the motion with Time.deltaTime to achieve frame-rate independent movement, while exposing speed via a serialized field in the editor.
Rotate a cylinder with transform.Rotate on the z axis using spin speed, delta time, and quaternion rotation, and learn to import and organize Unity assets from folders and asset store.
Install and enable the new input system in Unity using the package manager, then build a clean infinite runner project with an organized player folder and a basic player script.
Set up action maps and a move action in Unity's input system, bind left and right to A/D and joystick, and handle performed events to drive the player.
Move the player between three predefined lanes by storing lane positions as transforms, updating a destination vector, and setting transform.position to destination via a left/right lane index.
Learn how to implement smooth left-right movement with Vector3.Lerp, apply frame-rate independent timing, and add Rigidbody physics, colliders, and jump mechanics using gravity and velocity changes.
Explain how to compute the jump speed in unity from height using S = sqrt(2 G H), test it, and implement a ground check (isOnGround) to remove air movement.
Create a ground check in Unity using a serialized transform and a check sphere with a layer mask to detect ground within a radius. Debug with logs; explore animator.
Learn how to prepare a Unity character with a rig and avatar, set up an animator controller, and trigger transitions between running and jumping using an on-ground boolean parameter.
Create an animator reference with get component and set the on ground boolean to drive run and jump animations. Attach to Unity and move roads along the z axis.
Generate the environment procedurally using a world generator prefab in Unity, reusing a player prefab and defining start and end points to fill the road between them.
Generate road blocks by randomly selecting road prefabs in Unity, instantiate them along the path between start and end, and use Vector3 distance and z-axis placement.
Enable collision for road ground objects by assigning the workable layer, creating road prefabs and variants, and adding a mesh collider for proper runner collisions.
Create a movement component in Unity with speed and direction fields, applied to road blocks. Update positions and connect to the world generator to control speed in an infinite runner.
Use a trigger and on trigger exit in Unity to spawn new blocks, relaying events with a rigidbody, and refactor into a reusable function for seamless endless runner gameplay.
Implement building spawning for an infinite runner by placing left and right buildings at defined spawn points, with random rotation and scaled sizes, and hook up the world generator.
Organize the Unity infinite runner by grouping road blocks, buildings, and street lights with headers and serialized fields. Refine spawning with transforms and quaternions, and prepare shader-based world bending.
Explore shaders in Unity using shader graph, from vertex and fragment shaders to creating materials, textures, and parameters that control color, metallic, and smoothness.
Assign the band material to your models and test in play mode. Manipulate vertex positions in object space with the vertex shader, then transform with world and model matrices.
Learn to bend game geometry using a shader graph and the circle equation to arc the environment, offsetting the vertex x from z to create a curved road.
Explore a composition-based approach to spawning threats in a Unity infinite runner, building a threat base, car prefab, and movement components, then use coroutines for timed spawns.
Spawn cars with a coroutine in Unity, looping threats, instantiating vehicles at a start point, waiting for spawn interval, and directing them toward an end point with road block tags.
Explore random car spawning across three lanes using a world generator, with serialized lane references and spawn points, while comparing composition-based access to direct movement component usage for performance.
Create a roadblock prefab with movement, visuals, and a box collider, and implement spawn-point filtering using physics overlap to prevent overlapping threats.
Refactor the thread prefab into a reusable parent with car and roadblock variants, configure collisions and visuals, and unify movement speed with an environment-wide parameter for global speed control.
Refactor the speed system by introducing a global speed controller, broadcasting changes via a delegate and on global speed changed event, with movement components subscribing to the unified speed.
Learn to implement a general pickup system in Unity by creating a pickup prefab and script that apply score and speed changes on player collision, with spawning and UI updates.
Implement a score keeper in Unity, wire score changes via a delegate to update a text mesh pro UI element in the in-game UI, and display the score on screen.
Rotate a coin in Unity with a simple rotation script and attach it to the coin model. Spawn multiple coins using an array spawner to test in a dedicated scene.
Refactor the spawning system by creating a base Spawnable class to unify thread and pickup spawning under a single start spawn elements routine, with tag-based occupation checks.
Move pickups above threats on trigger enter by using the threat’s center and height. Add a rigid body for collision detection and adjust the spawner to fix coin height.
Build a modular train segment system in Unity with a head and body, variable visuals, and random mesh selection, using prefab variants to spawn connected segments for an infinite runner.
Implement random generation and movement of train segments in Unity, spawning body parts from a segment prefab and designating the head for a continuous infinite runner.
Fix overlapping spawns and coin placement by raising spawn y to 3 and increasing jump height; ensure train and coins use layers and add an adjusted flag for camera follow.
Learn to implement a follow camera in Unity by calculating player offset and updating the camera in LateUpdate, then enable Rigidbody interpolation to smooth movement and prevent trains from colliding.
Refactors occupancy check into a GameplayStatics class, blocking the player from moving into threat-occupied lanes; updates movement to query occupancy before moving using a detection half extent and threat tag.
This lecture tackles fixing road hole collision and refining trigger-based roadblock spawning in a Unity infinite runner, using serialized spawn definitions, weighted random selection, and debugging strategies.
Create a fail zone to trigger game over via on trigger enter, and route the game over to a central game mode while using gameplay statics to access it.
Implement a no spawn zone in Unity to balance an infinite runner, using a tagged prefab and trigger collider, and adjust spawn intervals for cars, trains, roadblocks, coins, and pickups.
Learn to model a speed boost prop in Blender, using extrusion, beveling, and UV mapping with a shared color texture, then prepare it for export to Unity.
Learn to create a speed boost pickup in Unity by exporting a Blender model as FBX, importing it, applying a bend material, and configuring speed +10 for 3 seconds.
Implement an in-game UI system with three states: play, pause, and game over, using a UI switcher to activate one submenu at a time and display the score.
Create a pause menu using a vertical layout group in Unity, add and align resume and back to menu buttons, and connect them to methods for loading scenes and restarting.
Create a main menu in Unity with a main camera, lighting, and a background, plus a modular UI with a menu switcher for start, how to play, leaderboard, and quit.
Create a static save data manager in Unity to save and load player profiles as JSON in the application's persistent data path.
Design and implement a Unity player profile UI in the main menu, with a lower-left panel, title, dropdown, add/delete buttons, a center new player popup, and saving to players.json.
Add and save a new player profile by reading input, loading existing data, and preventing duplicates. Update the save data manager and UI dropdown to reflect the new top entry.
Learn to delete a selected player profile from saved data, update the player list, and save changes with the save data manager; then implement a leaderboard storing scores and dates.
Implement a Unity save data manager to store leaderboard entries on game over by using a serializable leaderboard entry with name, date-time, and score, wrapped in list saved as json.
Implement robust player name handling and leaderboard sorting in Unity by updating the active player on changes, saving profiles, and inserting new scores in descending order.
Build and visualize a scrolling leaderboard in Unity by creating a leaderboard viewport, list, and scroll rect, then populate a prefab entry with score, date, and name.
Refreshes the leaderboard by clearing previous entries and repopulating from saved data, instantiating leaderboard entry prefabs, and initializing name, date, and score in the UI list.
Explore adding and coordinating audio in a Unity infinite runner, including main menu looping audio, in-game gameplay sounds, jumping and moving clips, and multiple audio sources for overlap.
Implement an independent audio player to play coin pickup sounds in Unity, spawning it on trigger and destroying it after the clip finishes, with controllable volume and pitch.
Welcome to the second installment of the Complete Game Development Series, Project Infinite Runner! Throughout this course, we will delve into the fundamentals of Unity, the widely utilized game engine, as we construct a fully developed infinite-runner game.
Our journey begins with an exploration of the core aspects of the Unity editor, encompassing basic manipulation of objects, game objects and their components, the game loop, and asset importing. As the game takes shape, we will progressively explore advanced concepts such as the new input system, physics, animation controllers, prefabs, shader graphs, audio, and more.
This tutorial emphasizes thoroughness. No steps will be omitted, and we will refrain from relying on third-party code or plugins. Every element, including the player controller, world generation, shader graph, player profile, and leaderboard system, will be implemented from the ground up. Our goal is to maintain clean and extensible code throughout the entire process.
Beyond Unity, we will briefly touch on basic modeling using Blender to provide insights into other facets of the game development workflow.
Upon completing the tutorial, you will possess a robust understanding of Unity and game development, coupled with a comprehensive infinite runner project. This knowledge will empower you to tackle more advanced projects and progress through the series seamlessly. Brace yourself for a thorough, enlightening, and continuous game development journey!