How to make a 2.5D Top Down Game in Unreal Engine -  Full Beginner Tutorial

How to make a 2.5D Top Down Game in Unreal Engine - Full Beginner Tutorial

Creating a 2.5D Top Down Game in Unreal Engine 5

Introduction to the Tutorial

  • This beginner tutorial focuses on creating a 2.5D top-down game using Unreal Engine 5, covering multi-directional sprite animations and character movement with the enhanced input system.
  • The tutorial aims to enhance the visual appeal of 2D games by integrating them into 3D environments with modern lighting techniques.

Setting Up the Project

  • The tutorial uses Unreal Engine version 5.5, but it is applicable for multiple versions due to minimal changes over time.
  • Users are guided to create a new blank blueprint project named "hybrid top down" without starter content for simplicity.

Creating a New Level

  • After opening Unreal Engine, users are instructed to create a smaller map for ease of use instead of an open-world map by selecting "File" > "New Level".
  • A new folder called "levels" is created within the content folder to save the current level as "L for level uncore playground."

Importing Character Assets

  • The tutorial utilizes an asset pack from Axle Arts under a Creative Commons attribution license, which has been repackaged for easier use in Unreal Engine. Users can download this from Patreon without needing membership.
  • Instructions are provided on unpacking and organizing assets into folders within Unreal Engine's content drawer, specifically focusing on JSON files that simplify sprite importation.

Configuring Sprite Animations

  • Users learn how to create flip books from imported sprites efficiently using JSON files that already contain necessary configurations, saving significant setup time compared to manual methods.
  • Adjustments can be made to playback speed settings in flip books through bulk editing options available in earlier versions of Unreal Engine, enhancing animation fluidity across multiple assets at once.

Utilizing Paper ZD Plugin for Animation Management

Introduction to Paper ZD Plugin

  • The Paper ZD plugin is introduced as an essential tool that simplifies managing multi-directional animations and enhances functionality like playing particle effects during specific animation frames.

Installing and Activating Paper ZD

  • For first-time users, instructions include shutting down Unreal Engine before installing the plugin via Epic Games Launcher and ensuring it’s activated post-installation through the plugins tab in Unreal Engine settings.

Setting Up Animation Sources and Blueprints

Organizing Content Folders

  • A new folder structure is established within the content drawer specifically for blueprints related to character animations (Kid Red), facilitating better organization throughout development processes.

Creating Animation Sequences

  • Users learn how to create animation sequences using both idle and walking animations while setting up multi-directional capabilities through easy-to-use menus provided by Paper ZD plugin functionalities.(572)

Developing Character Blueprint

Blueprint Creation Process

  • The character blueprint serves as the core component where gameplay logic will be implemented; users are guided through creating this blueprint based on existing classes tailored for sprite-based characters.(894)
  • Adjustments made here allow developers flexibility in defining properties such as movement mechanics while utilizing pre-existing functionalities from parent classes like paper characters.(921)

Finalizing Character Setup

Visualizing Character Size

  • To ensure proper scaling between character sprites and capsule components, adjustments are made regarding size parameters so that they align correctly within gameplay environments.(1023)
  • Techniques discussed include changing pixel per unit settings alongside direct scale adjustments within blueprints leading towards optimal visual representation during simulation tests.(1150)

This structured markdown file provides detailed insights into each segment of creating a 2.5D top-down game using Unreal Engine 5 while maintaining clear navigation through timestamps linked directly back into relevant sections of video content.

Setting Up Shadows for 2.5D Characters in Unreal Engine

Adjusting Sprite Settings

  • The character sprite is aligned with the ground, but it lacks shadows, making it appear disconnected from the environment.
  • To ensure the sprite casts shadows, modify settings in the blueprint rather than individual instances to maintain consistency across all sprites.

Directional Light Configuration

  • Adjusting the directional light's angle can enhance shadow realism; dragging on the blue axis positions shadows behind the character.
  • Changing time of day reveals that characters may self-illuminate at night, which is undesirable for 2D/3D hybrids.

Material Settings for Lighting and Shadows

  • Adding a cube demonstrates that while it casts shadows on the floor, it does not affect the character due to material settings.
  • Switching from a masked unlit sprite material to a masked lit sprite material allows characters to receive lighting information and cast shadows correctly.

Character Possession and Camera Setup

Spawning Characters in Unreal Engine

  • Deleting existing instances allows Unreal Engine to spawn characters automatically at designated player start locations.
  • Creating a game mode blueprint helps define default settings like which pawn should be possessed by players.

Configuring Game Mode and Default Maps

  • The new game mode blueprint (GM top down) must be set as default in project settings to ensure proper gameplay mechanics are applied.
  • Changing default maps ensures players start in intended environments when launching or packaging games.

Setting Up Cameras for Character Control

Camera Configuration Challenges

  • Without a camera setup, players cannot see their character; they control an invisible object instead.
  • Attaching a spring arm component helps position cameras without directly moving them, improving gameplay experience.

Finalizing Camera Angles and Distances

  • Adjusting angles manually can correct floating point errors; setting target arm length provides comfortable viewing distance from characters.

Implementing Input Mappings with Enhanced Input Action System

Introduction to Enhanced Input Action System

  • The enhanced input action system introduced in Unreal Engine 5.1 offers robust functionality compared to legacy systems but requires initial setup effort.

Creating Input Actions and Mapping Context

  • Two main components need creation: input actions (for movement and jumping), and an input mapping context that binds these actions to controls.

Binding Controls for Jumping and Movement

Configuring Jump Action

  • A digital button type is suitable for jump actions since they only require detecting if pressed or not; multiple keys can be assigned for flexibility.

Movement Control Complexity

  • For movement, using Axis 2D allows capturing both horizontal (left/right via A/D keys or arrow keys), and vertical (up/down via W/S keys).

Implementing Movement Logic

Registering Input Mapping Context

  • In BP Kid Red’s event graph, registering input mapping contexts enables character control based on player inputs effectively during gameplay sessions.

Executing Movement Commands

  • Using Add Movement Input simplifies movement implementation by allowing direct connection of axis values derived from user inputs into movement commands.

How to Set Up Animation States in Unreal Engine

Creating Idle and Walk Animation States

  • The process begins by renaming the animation state to "idle" and creating another state for "walk."
  • Each animation state requires specification of which animation to play; for idle, the "play idle" function is set without additional parameters.
  • Transition conditions between idle and walk states need to be established, starting with the transition from idle to walk.

Setting Transition Conditions

  • A simple method using velocity is chosen for transitions; this involves getting the owning actor's velocity.
  • The vector length of the velocity is checked; if greater than zero, it indicates movement (walking).
  • To create a transition back from walk to idle, existing logic can be copied and inverted.

Actor Rotation Setup

  • The character sprite must face the direction of movement; an arrow component is added for debugging purposes.
  • Orientation settings are adjusted so that the actor rotates towards its movement direction while ignoring parent rotations.

Adjusting Sprite Behavior

  • The sprite's rotation is set to world rotation, ensuring it remains static while the actor turns.
  • Similar adjustments are made for other components like the spring arm, maintaining consistent behavior during movement.

Implementing Directionality in Animation

Using Forward Vector for Directionality

  • The forward vector of the actor helps determine sprite rotation based on movement direction.
  • A node setup allows capturing both X and Y directionality from the owning actor’s forward vector.

Handling Coordinate System Differences

  • Issues arise due to Unreal Engine's coordinate system differences; Y-axis needs inversion when connecting inputs.

Character Movement Adjustments

Fine-Tuning Character Speed and Jump Mechanics

  • Rotation rates can be adjusted for smoother or snappier character turns based on player preference.
  • Max walk speed is modified from 600 cm/s to 400 cm/s for a slower-paced game experience.

Enhancing Jump Dynamics

  • Gravity scale adjustments make jumps feel snappier by increasing gravity effects while also tweaking jump Z velocity.

Project Settings Optimization

Improving Visual Quality

  • Motion blur settings are turned off to enhance shadow clarity and prevent ghosting effects on sprites.

Anti-Aliasing Configuration

  • Changing anti-aliasing methods improves performance; FXAA is preferred over temporal methods due to potential ghosting issues with sprites.

Global Illumination Settings

Managing Lighting Effects

  • Dynamic global illumination can enhance visuals but may impact performance negatively in 2D/3D hybrid games.

Integrating Marketplace Maps into Your Project

Adding Stylized Maps

  • Instructions provided on how to find stylized maps in Epic Games Launcher that fit pixel textures well.

Testing Map Compatibility

  • After adding a map with a player start point, all previous settings work seamlessly within this new environment.

This structured summary captures key insights from setting up animations, adjusting character mechanics, optimizing project settings, and integrating marketplace assets within Unreal Engine.

Turn any video into a summary like this

YouTube links, meetings, lectures — with transcripts, search, and chat.

Video description

Learn how to make 2D Top Down games with Unreal Engine Get my 17 Hour Unreal 2D Top Down Course: https://tinyurl.com/Unreal2DTopDown Download Assets to follow along: https://www.patreon.com/posts/starter-assets-2-124398555 PaperZD plugin on Fab: https://www.fab.com/listings/6664e3b5-e376-47aa-a0dd-f7bbbd5b93c0 Free 2D Template for UE5: https://github.com/CobraCodeDev/TP_2DSideScrollerBP Support the channel on Patreon: https://www.patreon.com/CobraCode 🔔Subscribe: http://www.youtube.com/channel/UCoKYIjbaEX4mnR8IWwtuBwA?sub_confirmation=1 👥Become a Channel Member: https://www.youtube.com/channel/UCoKYIjbaEX4mnR8IWwtuBwA/join 𝕏 Twitter: https://twitter.com/CobraCodeDev Discord: https://discord.com/invite/7VVeuZBy42 Timecodes: 0:00 Intro 0:30 Project Creation 1:51 Preparing the Assets 5:57 Setting up PaperZD 8:09 Setting up the Animation Source 14:40 Character Blueprint 17:08 Pixels Per Unit 20:24 Adjusting Sprite Position 24:11 Sprite Lighting and Shading 28:13 Possessing the Character 31:13 Setting up the Camera 33:44 Enhanced Input Actions 39:35 Character Movement 46:17 Character Animations 52:07 Directionality 57:46 Movement Adjustments 1:00:12 Project Settings 1:04:22 Adding Environments 🎵 Music By: - Team Astro - Hidden Treasure - Provided by Lofi Records - Watch: https://youtu.be/gZGLnxVrzD0 Icons made by Freepik (https://www.freepik.com) from Flaticon (https://www.flaticon.com/) #cobracode #gamedev #unrealengine #ue5