Video summary
How to make a 2D Game in Unreal Engine 5 - Beginner Tutorial
Main summary
Key takeaways
Summary
The tutorial walks through creating a basic side-scrolling 2D game in Unreal Engine 5. It covers preparing pixel-art assets, building a tile-map stage, creating a character and its animations, configuring a 2D camera and input, and tuning movement so the character feels responsive.
1. Create and configure the project
- Start with a Blank Games project using Blueprints, desktop settings, maximum quality, and no ray tracing or starter content.
- Create and save an empty level for the 2D stage, then set it as both the editor startup map and the game’s default map.
- Change the project’s Pixels Per Unit setting from 1.0 to 0.33. This scales the pixel art up so a 48-pixel character is closer to a reasonable in-game height.
2. Import and prepare the artwork
- Import the character sprite sheet and environment tile sets into an organized content folder.
- Apply Paper 2D texture settings to the pixel-art textures so they remain crisp rather than blurry.
- Convert the environment textures into tile sets:
- Set the main tiles’ size to 16 × 16 pixels.
- Add collision to the platforms and bridge the character will stand on.
- Leave the top grass layer without collision so the character can stand on it naturally.
- Decorative tiles do not need collision.
- Create a tile map, enlarge its working area, and draw a small stage using the collidable platforms and bridge.
- Use separate, clearly named layers for gameplay and background. The tutorial fills the background with sky tiles.
- The tile-map editor may crash when closed, so save frequently and keep its window open when possible.
- Process each tile set’s tile-sheet texture to add padding and help prevent gaps or “tile tearing.”
3. Create character sprites and animations
- Extract individual frames from the character sprite sheet using Grid mode. In the example, the 200 × 280 sheet has four columns and four rows, so each frame is 50 × 70 pixels.
- Delete blank extracted frames.
- Create four flipbooks:
- Idle: first four frames, set to 5 FPS.
- Run: running frames, set to 9 FPS.
- Jump rise: a single frame.
- Fall: a single frame.
- Keep the extracted sprites and flipbooks in separate folders for organization.
4. Build the character Blueprint
- Create a Blueprint based on Paper Character, which supplies a capsule collider, flipbook component, and character movement component.
- Assign the idle flipbook to the sprite component.
- Set the capsule half-height to about 75 and radius to about 25. Move the sprite down slightly on the Z axis (about −2) to align it with the capsule.
- Place the character on the same Y plane as the stage. Move the tile map slightly backward on Y (about −0.1) to prevent visual flickering where the character and gameplay tiles overlap.
5. Set rendering and post-processing for 2D
The presenter recommends changing Unreal’s 3D-oriented defaults to avoid unwanted effects on pixel art.
In Project Settings:
- Turn off motion blur and anti-aliasing.
- Turn off auto exposure and set its bias to zero.
- Disable Lumen global illumination and reflections.
- Use regular shadow maps rather than virtual shadow maps.
- Disable ambient occlusion.
Then add a Post Process Volume, set it to affect the entire level, and set minimum and maximum EV100 to 0. Set vignette intensity, expand gamut, and tone curve amount to 0 to preserve the sprites’ original appearance. Add the same post-process setup to other levels as needed.
6. Set up the game mode and camera
- Create a Game Mode Blueprint and assign the Paper Character Blueprint as its default pawn.
- Set that Game Mode as the project’s default.
- Add a Player Start at the stage, aligned to Y = 0.
- Add a spring arm and camera to the character:
- Rotate the spring arm by −90° for a front-facing side view.
- Set the camera to Orthographic and its Ortho Width to about 700.
- Disable the spring arm’s collision test, which can otherwise cause unwanted camera zooming.
- Use the spring arm’s world/absolute rotation so it does not turn when the character turns.
7. Add movement and jump input
Use Unreal’s Enhanced Input system:
- Create a Boolean Jump action and a 1D Float Move action.
- Bind Jump to Space.
- Bind movement to D for right and A for left; apply a Negate modifier to A so it produces a negative movement value.
- Create an Input Mapping Context and add it to the player’s Enhanced Input Local Player Subsystem when play begins.
- Connect the Jump action to the character’s Jump and Stop Jumping functions.
- Connect the Move action to Add Movement Input, using the X axis as the world direction.
8. Switch animations based on movement
- On the character’s Tick event, check velocity length to determine whether the character is moving.
- If the character is on the ground, show the run animation when moving and the idle animation when stationary.
- If airborne, check vertical velocity:
- Use the fall flipbook when descending.
- Use the jump-rise flipbook when ascending.
- The tutorial checks for a downward velocity around −100 rather than switching exactly at the jump’s peak, which can make the transition feel more natural.
- The presenter notes that the free PaperZD plugin can make more complex animation state management easier.
9. Turn the character and improve movement feel
- Use the sign of the movement input to turn the character: face right at 0° and turn 180° around Z when moving left.
- Tune the Character Movement component:
- Gravity: about 3.0.
- Jump velocity: about 800.
- Air control: about 0.7.
- Enable Use Flat Base for Floor Checks so the character drops cleanly from ledges.
- Enable Constrain to Plane and constrain along Y to keep the character on the 2D gameplay plane.
- Finally, expand the tile-map stage with additional layers and decorative elements such as clouds and props.
Speakers and sources featured
Speaker: One tutorial presenter, identified as Cobra Code in the video metadata; no other speakers are apparent in the subtitles.
Sources and resources mentioned by the presenter:
- The Legacy Fantasy asset pack, credited in the subtitles to Anokolisa.
- A UE5 2D settings blog post, apparently the UE5Study reference named in the metadata.
- The PaperZD plugin for animation graphs.
- The presenter’s Unreal Engine 2D course and free template are also mentioned.
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.