
Install Unity Hub, choose a Unity editor version, install platform modules, and set Visual Studio Code as the external script editor; create a temporary project to verify Mono and Omnisharp.
Create a Unity project named we made 2048, load sample scene, and explore the editor windows: game, hierarchy, project, console, inspector, and adjust layouts for a four by four board.
Create a canvas and event system, configure the canvas to scale with screen size, and build a 4x4 board grid. Then create a tile prefab with text using TMP.
Develop a tile system in Unity by building a tile manager on the board grid, spawning and positioning tiles, and a tile script to track values and display text.
Move tiles on a 3x3 grid using keyboard input in Unity, reading horizontal and vertical axis values with GetAxisRaw in the update loop, and update tile positions.
Animate tiles in Unity by interpolating from start to end positions over time using a t value and an animation curve via a scriptable tile settings object.
Add tile spawning after every valid move with a spawn animation, using a tile manager to spawn randomly and update positions after moves, ensuring tiles spawn only when movement finishes.
This lecture teaches implementing tile merging in 2048 with Unity and C#, adding a Tile Manager merge function, handling direction-based moves, equality checks, merge animations, and safeguards against in-between tiles.
Create a minimalist new game button within a grid-based UI showing score, best score, and undo, then wire it to restart the game by reloading the scene.
Implement an undo system wired to the undo button by tracking game states with a stack and restoring previous tile values after each move, enabling unlimited undo.
Learn to implement score tracking in a Unity 2048 clone by updating the tile manager, wiring the score UI with Unity events, and animating score changes, including undo support.
Implement a best score in a Unity 2048 game by adding a score field and best score updated event, updating the ui, and persisting it with player preferences across sessions.
Track and display the move count in 2048 using Unity and C#. Wire the move counter to the tile manager and game state to support undo.
Create and display a game timer using a stopwatch to track elapsed time, format minutes and seconds (with optional hours), and wire timer updates to the user interface.
Configure tile colors by value in Unity using a serializable tile color class and editor-driven color pairs, applying foreground and background colors to each tile based on its value.
Organize your Unity project by creating scripts and game folders, moving related assets, and forming UI, data, and tile groups to keep assets easy to find.
Create a separate game over overlay with new game and undo options, wire the score display to updates, and implement Unity animator transitions to show and hide the screen.
Add swipe controls for mobile by implementing a swipe input manager, creating a multiple input manager to combine keyboard and swipe inputs, and integrating with the tile manager in Unity.
Export your Unity game for web with WebGL, include the main scene, and set canvas resolution. Build runs a local server to host and test in a browser.
Export your Android game by configuring build settings, enabling IL2CPP, creating a keystore for Google Play, building the APK, and distributing via Google Play or other stores.
Export your Unity project to iOS by switching to the iOS platform, configuring player settings, and building for a simulator before generating an IPA for App Store distribution.
export your unity game as standalone apps for macos, windows, and linux by selecting standalone, adjusting player settings such as resolution and aspect ratios, and building for each platform.
Explore Unity concepts and tools by remaking a 2048-style game, using prefabs, core routines, animations, animation curves, and Unity events. Analyze how and why the game works and invite feedback.
Welcome!
If you have ever wanted to create your own game but have felt like it was too intimidating, then this course is for you!
In this course we will be recreating the popular game 2048 from scratch in Unity. I will be walking you through every line of code we write as well as every action we take in Unity. By recreating this game from scratch, we will be learning what it takes to make a game.
We will start off with the basics, creating the groundwork for the game. Then we will add features and polish one-by-one until we have the finished game and a better understanding of how the game works.
Below are just a few of the things we will be covering in this course:
Scriptable Objects - to extract shared configuration from the scene into the project.
Coroutines - to run code in parallel
UnityEvents - to decouple code from UI
LayoutGroups - to easily create and place UI elements
Animations & Animation Curves - to add some polish and make your game look good
By the end we will have a fully functional game that can be played on Android/iOS/Web/Windows/Mac/Linux and you should have a good understanding of Unity and what it provides to create your own games!