
Unreal Engine 2D Framework
Base 2D-Framework
The source code can be downloaded from this Git Repo
​
This project began as a personal initiative in the summer of 2023 after revisiting my former college and discussing my recent work with my lecturers. During our conversation, the idea of developing a 2D game in Unreal Engine emerged, despite the common preference for using Unity for such projects. What started as a casual exploration quickly evolved into a meaningful passion project.
​
The primary objective was to assess the challenges of using Unreal Engine, traditionally designed for 3D games, to create a 2D game using sprite sheets for the in-game actors. One of the main technical challenges was gaining access to Unreal’s 2D elements, which required modifying build dependencies and project files to include the appropriate plugins and dependencies.
​
Key features implemented in this project include:
-
2D character controls utilizing the enhanced input system
-
A data asset containing arrays for attack, movement, and miscellaneous flipbooks
-
A base animation component that manages animation data and can be inherited or attached to different actors
-
Multi-parallax scrolling using materials on planes
-
Custom levels with clamped player camera based on tilemaps
-
Basic 2D projectiles constrained to a fixed depth axis
2D/3D Hybrid
The next step for this framework is to implement a hybrid 2D/3D system within the game, along with additional features such as lighting sprites with Lumen and using Niagara particles for basic magic effects.
​
A key feature in development is the seamless transition between 2D and 3D gameplay. This was achieved by using multiple characters and an additional class to determine the appropriate level switch. Game modes were assigned to specific levels to ensure the correct character spawns, facilitating smooth transitions between dimensions.
​
Regarding the animation system for 2D assets, the initial approach of declaring individual animations and assigning them manually was inefficient. To improve this, the system was reworked to use a data asset containing three adjustable arrays for movement, attack, and miscellaneous animations. This file is incorporated into an abstract animation component, which can then be extended for various use cases, such as players or enemies, ensuring flexibility and reusability.
​
Niagara particles have been integrated into various aspects of the game, including:
-
Spawning, trails, and impact of magic missiles
-
Laser spawn, beam, and impact particles
-
Visual audio cues for accessibility, indicating the location of certain settings
​
A demo showcasing these features is available below. Please note that the assets and sounds used are placeholders and not original work.
​
Future plans for the framework
Some of the ideas that are currently getting looked at for this framework and hopefully will be implemented are:
-
Creating more components to handle general stuff such as actors sound effects and hurt effects
-
looking into proper accessibility settings (colour filtering, more audio visual cues, adjustable text sizes)
-
cross platform widget implementation (what button should be pressed for each platform to interact)
-
controller adjustable UI elements adjustable settings
-
Overhaul on the player UI
-
Basic Enemy AI to follow and attack the player
​