On All Fronts
Latest Demo
Check out our latest updates on our YouTube: https://www.youtube.com/@haywireinteractive/videos
What is this?
On All Fronts is a tactical shooter and strategy FPS / RTS game developed with Unreal Engine 5, leveraging the new Mass Entity (ECS) framework to have a very large number of entities not seen in traditional FPS games (tens or hundreds of thousands). Think Squad meets Foxhole meets PlanetSide 2 mixed in with massive number of AI controlled soldiers.
Note that the project has transitioned to closed source so we could use paid assets, but this open source repo will stay around to help others learn the Mass Entity system which is not very well-documented/supported yet.
Join our Discord Server here.
Motivation
In today's MilSim games players frequently end up doing things or seeing things that would not happen in an actual MilSim. Examples:
- Soldiers magically spawn onto the battlefield
- Areas of interest are captured by standing near them
- Areas that should be defended have little or no one defending them (because it's boring)
- Soldiers being revived who should be dead
- Soldiers being healed much faster than they should be able to
On All Fronts aims to eliminate these unrealistic occurrences while keeping the game fun. It mainly does this by leveraging AI to do the not-so-fun stuff such as:
- Moving soldiers to the frontlines
- Defending all areas of interest, even those with little activity
- Logistics
- Vehicle repairs
- Medical evacuation (medevac)
Human players will never spawn soldiers onto the battlefield. Instead they will possess an AI-controller soldier already on the battlefield. Each match will last until all soldiers of one team are dead or main objectives have been accomplished.
Roadmap
The project is broken into multiple phases. For current status, see Project Tracker.
Phase 1: Demo
- Single player: One human player and thousands of AI soldiers (no vehicles)
- Epic's City Sample map
Phase 2: Early Access
- Multiplayer FPS game with per-server battles
- Human and AI soldiers only (no vehicles)
- Epic's City Sample map
Phase 3: Release
- Ground vehicles
- Commander assets (e.g. artillery)
- More maps
Phase 4: Multiplayer MMO
All players in the game will be in a single battle at a time, across multiple servers.
This phase is split into two sub-phases below.
Phase 4A: Server switching between zones
The map will be split up into zones. When a player reaches the border between zones, they load into a different server that manages that area of the map.
Phase 4B: Server meshing across zones
Seamless switching between servers and players at the borders of servers will talk to all nearby servers to have a seamless experience across zones.
End Game
The ultimate goal is to recreate a war at a scale such as in this video (with the teams a bit more balanced): https://youtu.be/RSqKx3FG0Lw
Possible Features
These ideas below would be explored in one of the phases above.
- Railroad system for logistics. Railroads can be damaged and repaired.
- Oil pipelines for transfering oil to vehicles quicker.
- Base building (FOBs and COPs)
- Pontoon bridges which can be built for river crossings. Bridges can be destroyed.
- Building destruction
- Naval warfare
- Helicopters
- Airplanes (not player controlled initially, only AI)
FAQ
Development Environment Setup
Prerequisites
- Install Git. Two recommended options:
- For Git beginners, GitHub Desktop is recommended.
- For more advanced users, Git for Windows is recommended. Use the default options in installer.
- Install Unreal Engine 5.0.3 from Epic Games Launcher.
-
Install Visual Studio 2022.
-
Follow steps here for which options to choose when installing.
-
In Visual Studio Installer make sure to select a .NET Framework SDK version, at least 4.6. ![image](https://user-images.githubusercontent.com/108254625/198902032-370cc297-1a42-4b91-9c29-f37ee5922ce3.png)
-
If you don't have it installed, install latest .NET Core 3.1: https://dotnet.microsoft.com/en-us/download/dotnet?cid=getdotnetcore
- If you plan to modify C++/C# code: Launch Visual Studio > Tools > Options
- Text Editor > C/C++ > Tabs > select "Keep tabs"
- Text Editor > C# > Tabs > select "Keep tabs"
- Text Editor > Advanced > uncheck "Use adaptive formatting"
Quick Start
The project is structured as an Unreal Engine plugin. To quickly get started, we have an Unreal Engine starter project that already includes a reference to plugin. To use it:
- In GitHub Desktop:
- File > Clone repository > URL tab
- URL: https://github.com/Leroy231/ProjectMStarter.git
- Local path: choose a folder on your machine where you want the Unreal Engine project created
- Click Clone
- In Windows Explorer double click the .uproject at the root of the folder where you cloned the project.
- You should get a prompt about missing modules. Click Yes to build them.
- Note that you won't see any progress while it's building, just be patient. If you want to make sure it's building, open Task Manager and you should see Microsoft C++ Compiler using CPU. On an Intel Core i7-9700K CPU @ 3.60GHz this took about 3 minutes.
- When it's done, it should open the project in Unreal Engine. Now move onto the next section below.
Add Assets
- First confirm that the ProjectM folder shows up in your Content Drawer under Plugins. If you don't see Plugins, click Settings button on top right of Content Drawer > Show Plugin Content.
- Add Content Packs from Content Drawer > Add > Add Feature or Content Pack > Blueprint
- First Person > Add to project.
- Third Person > Add to project.
- Add Unreal Engine Marketplace free content to project. Note that some of this content hasn't been migrated to UE5 yet, so when you try to add it from the Epic Games Launcher, check "Show all projects" after clicking "Add to Project". Then in the "Select Version" dropdown select the newest version in the list.
- Military Weapons Silver
- M1A1 Abrams Tank
- Realistic Starter VFX Pack Vol 2
- Animation Starter Pack
- Now in Content Drawer open "Plugins/ProjectM Content/Playgrounds/Maps/L_MediumWithTanks" level and use PIE to test out the project.
- You might have to build NavMesh paths via menu for move commands to work: Build > Build Paths.
Adding Plugin to Existing Project
- If you want to use the City Sample project for developing in a large level, get the project from UE Marketplace and then create a project using that template.
- If there is no .sln in the project folder, generate VS project from right clicking .uproject in project folder.
- Open .sln in Visual Studio if it isn't already open.
- If project isn't open yet in UE, run the project from VS.
- Enable the required plugins in UE project if they are not already:
- Edit > Plugins
- Search for "mass"
- Check MassAI, MassCrowd, MassEntity, MassGameplay. Answer Yes if it asks if you're sure.
- Quit UE.
- In PowerShell:
cd
to project folder. This is the folder that has the .uproject file.
- If
Plugins
folder does not exist, mkdir Plugins
.
cd Plugins
git clone https://github.com/Leroy231/OnAllFronts.git
- If in City Sample:
rmdir -recurse AnimToTexture
git clone --branch projectm https://github.com/Leroy231/AnimToTexture.git
- Right click the .uproject file again and re-generate the solution to get the new files from the Plugins folder to show in VS.
- In order to get Mass ParallelForEachEntityChunk to actually parallelize, it requires passing an argument to editor on launch:
- In VS Solution Explorer, right click the project under Games folder > Properties.
- Debugging > Command Arguments > Add " -ParallelMassQueries=1" to the end (without quotes).
- Rerun project from VS.
- Edit > Project Settings
- Engine - Input > Bindings
- Ensure you have all the AxisMappings and ActionMappings from here: https://github.com/Leroy231/ProjectMStarter/blob/main/Config/DefaultInput.ini
- Engine - Mass
- Search for "MassUpdateISMProcessor" > Mass > Module Settings > Mass Entity > Processor CDOs > Index (for MassUpdateISMProcessor) > Auto Register with Processing Phases > uncheck. Note this will already be unchecked in the City Sample project.
- Search for "MassGenericUpdateISMVertexAnimationProcessor" > Mass > Module Settings > Mass Entity > Processor CDOs > Index (for MassGenericUpdateISMVertexAnimationProcessor) > Auto Register with Processing Phases > check
- Do the same as previous for "MassSimpleUpdateISMProcessor".
- Engine - Navigation System > Agents > Supported Agents > Add agents based on the "SupportedAgents" towards bottom of this file: https://github.com/Leroy231/ProjectMStarter/blob/main/Config/DefaultEngine.ini
- Only the Name, Nav Agent Radius, and Nav Agent Height need to be set.
- Follow steps above in Add Assets section.
To add soldiers to City Sample Level
- Duplicate Small_City_LVL and call it Small_City_ProjectM_LVL
- Open Small_City_ProjectM_LVL
- Delete Actors
- Mass Spawners: BP_MassTraffic* and BP_MassCrowdSpawner
- BP_CitySampleWorldInfo
- BP_Nightmode
- SmartObjectCollection
- Open L_Template
- Copy PM_* actors
- Paste in Small_City_ProjectM_LVL. Ensure locations of all actors were preserved.
- Set up world info
- Select actor "PM_WorldInfo"
- Details pane > Sim > Sunlight > set "Sun Light" to "DirectionalLight_WP"
- Set "Sky Dome" to "SM_dome"
- From menu: Build > Build ZoneGraph
- Select each PM_MilitaryUnitMassSpawner* actor > Details > World Partition > Is Spatially Loaded > uncheck
- World Settings > GameMode Override > BP_FirstPersonGameModeCommander
- We need to make collisions loaded all the time because AI soldiers rely on them to determine if they have line of sight to enemies:
- Load all cells in World Partition
- While we've got all cells loaded, build NavMesh from menu: Build > Build Paths
- In Outliner search for "coll"
- Click on any actor in the Outliner and select all (Ctrl+A)
- Details > World Partition > Is Spatially Loaded > uncheck
- World Partition: Unload all cells and load any if desired