Here’s a step-by-step roadmap to help you structure the development process for your game in Unreal Engine 5 using Blueprint. The plan will break down tasks into manageable phases and milestones, ensuring efficient progress. Each phase will focus on grouping related tasks, with dependencies and priorities clearly highlighted. I want you to code a simulation template with lots of features using Unreal engine 5 with blueprint. I have never used blueprint or Unreal engine so write everything you write, everything you want me to do, in detail every time. Decide everything yourself, do not use "e.g.", "example", "optionally" words and open-ended words. First start writing the file structure and the first Phase 1: Core Mechanics and Player Controller Setup.
Roadmap for Unreal Engine 5 FPS Game with Blueprint
Phase 1: Core Mechanics and Player Controller Setup
FPS Camera and Customizable Character Controller
Set up a first-person camera view.
Create a character blueprint with movement inputs (WASD, Jump, Crouch).
Implement a modular customization system for character attributes.
Integrate sprinting functionality tied to stamina.
Health and Stamina Management
Add health and stamina variables.
Set up regeneration logic for stamina and conditions for health reduction.
Add UI widgets to display health and stamina bars.
Phase 2: Core Gameplay Systems
Inventory System for Item Management
Create an inventory blueprint with item stacking and drag/drop support.
Implement adding/removing items via player interaction.
Door and Key System
Implement a door blueprint with locked/unlocked states.
Create keys as items and establish logic for unlocking specific doors.
Outline System for Interaction Feedback
Add post-processing materials for outlining interactable objects.
Set up Blueprint interfaces for interaction triggers (e.g., when aiming at doors or items).
Phase 3: Open World Setup and Environment Interactions
Open-World Town Area with Rotating Skybox
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Add a building system for placing or upgrading props and structures.
Carriable Trash Bags and Boxes
Design trash bags and boxes as carriable objects with physics.
Implement drop-off zones to detect when players dispose of trash correctly.
Phase 6: NPCs, Dialogue, and Merchant Systems
NPC System with Dialogue and Interaction
Create an NPC blueprint with animation and interaction triggers.
Implement a dialogue system with text display and choice-based options.
Merchant System for Item Purchases
Design a merchant NPC with an inventory for buying and selling items.
Integrate the inventory and reward systems with merchant interactions.
Phase 7: Map and Navigation Systems
Map with Zoom In/Out Features
Create a 2D map with markers for key locations.
Implement zoom-in/out functionality with UI elements.
Sleeping System to Skip to the Next Morning
Add beds as interactable objects with sleep functionality.
Integrate the day-night cycle to advance time when the player sleeps.
Phase 8: Decorative and Immersion Systems
Poster System with Auto-Align for Walls
Create a poster placement system with auto-align on wall surfaces.
Add UI to allow players to select and place different posters.
Tools and Assets to Prepare
i have modular town assets and pre-built props.
i have character and NPC models with basic animations.
All UI elements (inventory, map, task list) are designed in advance.
This roadmap breaks down tasks into logical steps and phases for smooth progression, making sure each part builds on prior work.
File Structure Setup
Before diving into the development phases, it's essential to establish a well-organized file structure. This structure will help you manage assets, Blueprints, and other resources efficiently. Follow the steps below to set up your project’s file structure in Unreal Engine 5.
1. Create a New Unreal Engine 5 Project
Open Unreal Engine 5:
Launch the Unreal Engine 5 application from your computer.
Start a New Project:
On the Unreal Project Browser, click on the "Games" category.
Click the "Next" button.
Select Project Template:
Choose the "First Person" template. This template provides a basic first-person perspective setup, which is suitable for our FPS game.
Click the "Next" button.
Configure Project Settings:
Blueprint: Ensure "Blueprint" is selected.
Quality Presets: Choose "Maximum" for high-quality visuals.
Raytracing: Disable "With Starter Content" for this project.
Project Name: Enter a suitable name, e.g., "FPS_Simulation_Template".
Project Location: Choose a directory on your computer where you want to save the project.
Click the "Create" button to generate the project.
2. Set Up the File Structure in the Content Browser
Once your project is open, you will see the Content Browser at the bottom of the Unreal Editor. We'll create folders to organize different assets and Blueprints.
Access the Content Browser:
If the Content Browser is not visible, go to Window > Content Browser > Content Browser 1.
Create Folders:
Right-click in the Content Browser and select "New Folder".
Create the following folders by repeating this step:
Phase 1: Core Mechanics and Player Controller Setup
In Phase 1, we will establish the fundamental gameplay mechanics, including the player’s camera, movement controls, health and stamina systems, and the user interface to display these stats. Follow the detailed steps below to implement these features using Blueprint in Unreal Engine 5.
1. Set Up the First-Person Camera View
a. Create a Player Blueprint
Navigate to Blueprints/Core Folder:
Go to Content Browser > Blueprints > Core.
Create a New Blueprint Class:
Right-click in the Core folder.
Select "Blueprint Class".
In the Pick Parent Class window, choose "Character". The Character class includes movement functionalities which are essential for our player.
Name the Blueprint:
Rename this Blueprint to "BP_PlayerCharacter".
Open BP_PlayerCharacter Blueprint:
Double-click on "BP_PlayerCharacter" to open it in the Blueprint Editor.
b. Add a First-Person Camera Component
Add Camera Component:
In the Components tab (left side), click "Add Component".
Select "Camera" from the dropdown.
Rename this component to "FirstPersonCamera".
Position the Camera:
Select the FirstPersonCamera component.
In the Details panel, set the Location to X=0, Y=0, Z=64. This positions the camera at eye level.
Set Camera as the View Target:
Go to the Viewport tab.
Ensure the FirstPersonCamera is the active camera. Right-click on FirstPersonCamera and select "Make Active".
Disable Auto-rotation:
With FirstPersonCamera selected, in the Details panel, ensure that "Use Pawn Control Rotation" is enabled under Camera Settings.
c. Configure Camera Settings
Adjust Field of View (FOV):
With FirstPersonCamera selected, set the Field of View to 90 for a standard FPS experience.
Attach Mesh to Camera (Optional for Visibility):
If you want to see the player's hands, import or use a pre-existing skeletal mesh for hands.
Add a Mesh Component named "FirstPersonMesh".
Position it appropriately relative to the FirstPersonCamera.
2. Implement Character Movement Inputs (WASD, Jump, Crouch)
a. Set Up Input Mappings
Open Project Settings:
Go to Edit > Project Settings.
Navigate to Input Settings:
In the left sidebar, click on "Input" under Engine > Input.
Create Action Mappings:
Under Action Mappings, click the "+" button to add new actions:
Jump
Press the "+" sign next to Action Mappings.
Name it "Jump".
Click the dropdown next to "None" and press the Spacebar to bind the key.
Crouch
Click the "+" sign next to Action Mappings.
Name it "Crouch".
Click the dropdown next to "None" and press the Left Ctrl key to bind the key.
Create Axis Mappings:
Under Axis Mappings, click the "+" button to add new axes:
MoveForward
Name it "MoveForward".
Click the "+" sign and select "W" key.
Set Scale to 1.0.
Click the "+" sign again and select "S" key.
Set Scale to -1.0.
MoveRight
Name it "MoveRight".
Click the "+" sign and select "D" key.
Set Scale to 1.0.
Click the "+" sign again and select "A" key.
Set Scale to -1.0.
Turn
Name it .
b. Implement Movement in BP_PlayerCharacter
Open BP_PlayerCharacter Blueprint:
Switch to Event Graph:
Set Up Movement Inputs:
Move Forward/Backward:
Right-click in the graph and search for "MoveForward" under Input Actions.
Drag the "MoveForward" event into the graph.
Connect it to an "Add Movement Input" node.
For "World Direction", get the "Controller" > "Get Control Rotation".
Use the "Yaw" from the rotation to create a Forward Vector using a "Get Forward Vector" node.
Connect the Forward Vector to "World Direction".
Link the axis value to the Scale Value.
Move Right/Left:
Repeat the above steps for the "MoveRight" event.
Use the "Get Right Vector" node instead of "Get Forward Vector" for the direction.
Set Up Jump:
Right-click and add the "Jump" action event.
Connect it to the built-in "Jump" node of the Character class.
Similarly, add "Jump Released" event and connect it to the "Stop Jumping" node.
Set Up Crouch:
Right-click and add the "Crouch" action event.
Create a "Toggle Crouch" logic:
Use a "Branch" node to check if the character is already crouched.
If crouched, call "UnCrouch".
If not crouched, call "Crouch".
Set Up Looking Around:
Turn (Yaw):
Right-click and add the "Turn" axis event.
Connect it to a node.
3. Implement a Modular Customization System for Character Attributes
To allow for modular customization of the character's attributes, we'll create adjustable variables and expose them for easy tweaking.
a. Create Character Variables
Open BP_PlayerCharacter Blueprint:
Navigate to the Variables Panel:
On the left side, find the "Variables" section.
Add Variables:
Health
Click the "+" button.
Name it "Health".
Set the Variable Type to "Float".
Set the Default Value to 100.
MaxHealth
Click the "+" button.
Name it "MaxHealth".
Set the Variable Type to "Float".
Set the Default Value to 100.
Check the "Instance Editable" box to allow customization.
Stamina
Click the "+" button.
Name it "Stamina".
Set the Variable Type to "Float".
Set the Default Value to 100.
MaxStamina
Click the "+" button.
Name it "MaxStamina".
Set the Variable Type to "Float".
Set the Default Value to 100.
Check the "Instance Editable" box.
Organize Variables:
Drag and arrange the variables for readability.
b. Expose Variables for Customization
Select Each Editable Variable:
Click on "MaxHealth".
In the Details panel, ensure "Instance Editable" is checked.
Repeat for "MaxStamina".
Set Up Health and Stamina Initialization:
In the Event Graph, add the "Begin Play" event.
Connect it to nodes that set Health to MaxHealth and Stamina to MaxStamina:
Set Health:
Drag "Health" into the graph and choose "Set Health".
Drag "MaxHealth" and connect it to "Set Health".
Set Stamina:
Drag "Stamina" into the graph and choose "Set Stamina".
Drag "MaxStamina" and connect it to "Set Stamina".
Compile and Save:
Click "Compile".
Click "Save".
4. Implement Sprinting Functionality Tied to Stamina
Sprinting allows the player to move faster at the cost of stamina. We'll set up sprinting mechanics that drain stamina when activated and regenerate it when not in use.
a. Create Sprint Input Mapping
Open Project Settings:
Go to Edit > Project Settings.
Navigate to Input Settings:
Click on "Input" under Engine > Input.
Create Action Mapping for Sprint:
Under Action Mappings, click the "+" button.
Name it "Sprint".
Click the dropdown next to "None" and press the Left Shift key to bind the key.
Save and Close Project Settings:
Click "Save".
Close the Project Settings window.
b. Implement Sprint Logic in BP_PlayerCharacter
Open BP_PlayerCharacter Blueprint:
Navigate to Event Graph:
Add Sprint Variables:
IsSprinting
Click the "+" button.
Name it "IsSprinting".
Set the Variable Type to "Boolean".
Set the Default Value to False.
SprintSpeed
Click the "+" button.
Name it "SprintSpeed".
Set the Variable Type to "Float".
Set the Default Value to 600.
Check the "Instance Editable" box.
WalkSpeed
Click the "+" button.
Name it "WalkSpeed".
Set the Variable Type to "Float".
Set the Default Value to 300.
Check the "Instance Editable" box.
Set Default Walk Speed:
In the Begin Play event, set the character’s default movement speed to WalkSpeed:
Drag "Get Character Movement" into the graph.
From "Get Character Movement", drag to "Set Max Walk Speed".
Connect "WalkSpeed" to "Set Max Walk Speed".
Handle Sprint Input:
Sprint Pressed:
Right-click and add the "Sprint"Pressed event.
Connect it to a "Set IsSprinting" node and set it to True.
Create a "Set Max Walk Speed" node connected to "Get Character Movement".
5. Add Health and Stamina UI Widgets
Displaying health and stamina to the player is crucial for gameplay. We'll create UI widgets to show these stats on the screen.
a. Create Health Bar Widget
Navigate to UI/Widgets Folder:
Go to Content Browser > UI > Widgets.
Create a New Widget Blueprint:
Right-click in the Widgets folder.
Select "User Interface" > "Widget Blueprint".
Name it "WBP_HealthBar".
Design the Health Bar:
Double-click on "WBP_HealthBar" to open it in the Widget Designer.
Add a Progress Bar for Health:
In the Palette on the left, under "Common", drag a "Progress Bar" onto the Canvas Panel.
Rename it to "HealthProgressBar".
In the Details panel:
Set the Size to "Size X=200, Size Y=20".
Position it at the Top Left corner with OffsetsLeft=20 and Top=20.
Bind the Progress Bar to Health Variable:
With HealthProgressBar selected, scroll to the "Progress" section in the Details panel.
Click the "Bind" dropdown next to "Percent" and select "Create Binding".
In the Graph that opens, perform the following:
Get Player Character: Right-click and add "Get Player Character" node.
Cast to BP_PlayerCharacter: Drag from "Get Player Character" and add a "Cast To BP_PlayerCharacter" node.
Get Health and MaxHealth:
From the BP_PlayerCharacter pin, drag and add "Get Health".
Drag again from the BP_PlayerCharacter pin and add "Get MaxHealth".
Calculate Health Percentage:
Use a node to divide by .
b. Create Stamina Bar Widget
Navigate to UI/Widgets Folder:
Create a New Widget Blueprint:
Right-click in the Widgets folder.
Select "User Interface" > "Widget Blueprint".
Name it "WBP_StaminaBar".
Design the Stamina Bar:
Double-click on "WBP_StaminaBar" to open it in the Widget Designer.
Add a Progress Bar for Stamina:
In the Palette, drag a "Progress Bar" onto the Canvas Panel.
Rename it to "StaminaProgressBar".
In the Details panel:
Set the Size to "Size X=200, Size Y=20".
Position it below the HealthProgressBar with OffsetsLeft=20 and Top=50.
Bind the Progress Bar to Stamina Variable:
With StaminaProgressBar selected, scroll to the "Progress" section.
Click the "Bind" dropdown next to "Percent" and select "Create Binding".
In the Graph:
Get Player Character: Add "Get Player Character" node.
Cast to BP_PlayerCharacter: Add "Cast To BP_PlayerCharacter" node.
Get Stamina and MaxStamina:
From the Cast To node, drag and add "Get Stamina".
Drag again and add "Get MaxStamina".
Calculate Stamina Percentage:
Use a "Float / Float" node to divide Stamina by MaxStamina.
Connect the result to the "Return Value".
Compile and Save:
Click "Compile".
c. Create a HUD Widget to Display Health and Stamina Bars
Navigate to UI/Widgets Folder:
Create a New Widget Blueprint:
Right-click in the Widgets folder.
Select "User Interface" > "Widget Blueprint".
Name it "WBP_HUD".
Design the HUD:
Double-click on "WBP_HUD" to open it in the Widget Designer.
Add Health and Stamina Widgets:
In the Palette, drag and drop both "WBP_HealthBar" and "WBP_StaminaBar" onto the Canvas Panel.
Position them appropriately:
HealthBar at Top Left with Offsets Left=20, Top=20.
StaminaBar below the HealthBar with Offsets Left=20, Top=50.
Adjust Visibility and Appearance:
Ensure both bars are visible and adjust their sizes if necessary.
Compile and Save:
Click "Compile".
Click "Save".
d. Implement the HUD in the Player Controller
Navigate to Blueprints/Core Folder:
Create a Player Controller Blueprint:
Right-click in the Core folder.
Select "Blueprint Class".
Choose "PlayerController" as the parent class.
Name it "BP_PlayerController".
Open BP_PlayerController Blueprint:
Set Up the HUD Widget:
Switch to Event Graph.
Add Widget to Viewport on Begin Play:
Drag from the "Event BeginPlay" node and add a "Create Widget" node.
In the "Create Widget" node:
Set the "Class" to "WBP_HUD".
Promote the output to a variable named "HUDWidget".
Add to Viewport:
Drag from "HUDWidget" and add an "Add to Viewport" node.
Set Input Mode to Game Only:
After "Add to Viewport", drag and add a "Set Input Mode Game Only" node.
Connect the "Player Controller" input to "Self".
Make the Mouse Cursor Hidden:
Drag from "Set Input Mode Game Only" and add a "Set Show Mouse Cursor" node.
Uncheck the "Show Mouse Cursor" option.
Compile and Save:
Click "Compile".
Click "Save".
e. Assign the Player Controller to the Game Mode
Create a Game Mode Blueprint:
Navigate to Blueprints/Core Folder.
Right-click in the Core folder.
Select "Blueprint Class".
Choose "GameModeBase" as the parent class.
Name it "BP_GameMode".
Open BP_GameMode Blueprint:
Set Default Player Controller:
In the Details panel, find the "Player Controller Class" option.
Select "BP_PlayerController" from the dropdown.
Set Default Pawn Class:
Set "Default Pawn Class" to "BP_PlayerCharacter".
Compile and Save:
Click "Compile".
Click "Save".
Assign Game Mode in Project Settings:
Go to Edit > Project Settings.
Navigate to "Maps & Modes" under Engine > Maps & Modes.
Set "Default GameMode" to "BP_GameMode".
Save and Close Project Settings:
Click "Save".
Close the Project Settings window.
6. Verify the Setup
After completing all steps in Phase 1, it's essential to verify that everything works as expected.
Set BP_PlayerCharacter as the Default Pawn:
Ensure that BP_GameMode has BP_PlayerCharacter set as the Default Pawn Class.
This was done in the previous steps.
Place the Player Start in the Level:
Open your current level or create a new one.
In the Place Actors panel, search for "Player Start".
Drag and drop "Player Start" into the level where you want the player to spawn.
Play the Game:
Click the "Play" button at the top of the Unreal Editor.
The game should start from the Player Start position.
Test the following:
Movement: Use W, A, S, D to move the character.
Jump: Press Spacebar to jump.
Crouch: Press Left Ctrl to crouch and stand up.
Sprint: Hold Left Shift to sprint, which should drain stamina.
Health and Stamina UI: Observe the health and stamina bars at the top left of the screen.
Exit Play Mode:
Press ESC or click "Stop" to exit play mode.
7. Troubleshooting Tips
If you encounter issues during Phase 1, consider the following troubleshooting steps:
Movement Not Responding:
Ensure that the input mappings in Project Settings are correctly set.
Verify that "BP_PlayerCharacter" is correctly assigned as the Default Pawn Class in BP_GameMode.
Check that "BP_GameMode" is set as the Default GameMode in Project Settings.
UI Not Displaying:
Confirm that the BP_HUD widget is correctly created and added to the viewport in BP_PlayerController.
Ensure that the variables Health and Stamina are correctly initialized and bound in the UI widgets.
Stamina Not Draining or Regenerating:
Verify the logic in the Event Tick node within BP_PlayerCharacter.
Ensure that IsSprinting is correctly toggled based on sprint input.
Check that DeltaTime is properly connected in the stamina calculations.
Sprinting Still Allowed When Stamina is 0:
Ensure that there is a condition to stop sprinting and reset Max Walk Speed when Stamina reaches 0.
Summary of Phase 1
In Phase 1, you have successfully:
Set Up the Project’s File Structure: Organized your project with folders for Blueprints, UI, Characters, Environments, Props, etc.
Created the Player Character Blueprint: Implemented a first-person camera and basic movement controls including walking, jumping, and crouching.
Implemented a Sprinting Mechanic: Enabled sprinting tied to the player's stamina, including stamina drain and regeneration.
Developed Health and Stamina UI: Created user interface elements to display the player's health and stamina on the screen.
Configured the Game Mode and Player Controller: Ensured that the correct Blueprints are assigned to handle player input and HUD display.
With these core mechanics in place, you are now ready to move on to Phase 2: Core Gameplay Systems, where you will develop systems like the inventory, door and key mechanics, and interaction feedback.
Feel free to reach out if you need further assistance with the next phases or encounter any issues while implementing Phase 1!
Dataset releases
Not yet included in a published release.
"Turn"
Bind the mouse's "X" axis.
LookUp
Name it "LookUp".
Bind the mouse's "Y" axis.
Save and Close Project Settings:
Click "Save" at the bottom right corner.
Close the Project Settings window.
"Add Controller Yaw Input"
Link the axis value directly.
Look Up (Pitch):
Right-click and add the "LookUp" axis event.
Connect it to a "Add Controller Pitch Input" node.
Link the axis value directly.
Compile and Save:
Click "Compile" at the top left of the Blueprint Editor.
Click "Save".
Connect "SprintSpeed" to "Set Max Walk Speed".
Sprint Released:
Right-click and add the "Sprint"Released event.
Connect it to a "Set IsSprinting" node and set it to False.
Create a "Set Max Walk Speed" node connected to "Get Character Movement".
Connect "WalkSpeed" to "Set Max Walk Speed".
Implement Stamina Drain and Regen:
Add a Tick Event:
Right-click in the graph and add the "Event Tick" node.
Create Stamina Drain Logic:
Branch: Check if IsSprinting is True.
True:
Subtract from Stamina:
Get "Stamina".
Subtract a value (e.g., 20 * DeltaTime) using a "Float - Float" node.
Use a "Clamp" node to ensure Stamina doesn't go below 0.
Set Stamina with the new value.
Condition: If Stamina <= 0, set IsSprinting to False and revert Max Walk Speed to WalkSpeed.
Create Stamina Regen Logic:
Branch: Check if IsSprinting is False and Stamina < MaxStamina.
True:
Add to Stamina:
Get "Stamina".
Add a value (e.g., 10 * DeltaTime) using a "Float + Float" node.
Use a "Clamp" node to ensure Stamina doesn't exceed MaxStamina.