Hi RTS developers and fans
First of all, sorry for the ugly WIP name, it shows only my main inspirations: Age of Empires 2, the Total War series, and Company of Heroes. My work is not a recreation of them, but all the 3 have a significant reason to be highlighted, I will describe later why…
Disclaimer: Non-artist thread, all visual stuff is placeholder! Artists to join the project welcome!
Credits: The animated unit models are from the Rome Total Realism Platinum Edition mod of Rome Total War I, with the written permission from the modding team. Many thanks again! Other assets are my own work or free stuff.
[SIZE=12px]What and Why?[/SIZE]
The project is about making the right tool for creating RTS games with as many intelligently moving and fighting units as possible, that can be a good basis of a competing AI too. So the main focus is on creating a great single player experience by a custom pathfinder and movement system, as it is the most essential core part of any RTS game, and keeping performance as high as possible. Originally, it was started as a free-time game project, but converting it into a distributable tool probably would result in more benefits for everybody… The RTS system presented here is highly inspired and finally** very close to what is used in Company of Heroes**. it is worthy to watch this presentation (free registration needed): http://aigamedev.com/premium/present…h-destruction/ and th e pdf: http://files.aigamedev.com/insiders/…estruction.pdf
The target is to handle 400-500 unit actors with skeletal animation, or even more if the units consist of only static meshes (with some rotating mesh components for vehicles). Beyond the existing optimizations detailed below, GPU limitations can be stretched a bit by restricting the camera to a top down style, while the **CPU bounds **are to be increased in near future by multithreading a couple of processes currently only spread over a few frames by dividing up heavier tasks.
The test environment consists of a **landscape and static meshes **like rocks, their surface is tested to be passable or impassable for more unit capabilities, and afterwards other destroyable objects are inspected as instanced static mesh based foliage actor components, and special obstacle and building actors storing their own tile and cluster information. Its area size is currently set to 300x300 tiles with a 0.5m resolution, but it can be easily increased to e.g. 500x500 tiles with 1m resolution, depending on the actual game.
Classic build-develop-recruit-fight style, like Age of Empires games, where you can build your base with defensive walls, control individual units and groups of soldiers in formations, and play against more AI opponents simultaneously.
Real-time battles, as part of a campaign or of a turn based game, like Total War games, featuring open field and siege battles, where units are in nice formations and armies, do not get lost in a complex destructible environment, and the AI player can realize and utilize the benefits of terrain and defensive buildings effectively.
The UE4 project is based on a working testbed project made with 3DGamestudio for a long time (written in a C based language called Lite-C, developed within an own WYSIWYG world editor, which is free and open source, but excludes the RTS related parts), that only features the battle pathfinder and movement system. I decided to switch to UE4, as it is a cutting edge and very inspiring engine, allowing a much better workflow, and because C++ is the best friend of RTS game programmers. UE4 strongly won my little contest against CryEngine and Esenthel Engine (Unity fell out much earlier). In the beginning of the transition, I dropped the idea of making a custom runtime editor again, because UE4 editor is a really cool extensible tool, and supports game modding.
The core is written in C++, only the required parts are exposed to Blueprints, ensuring comfortable usage for non-programmer game developers, flexible customization and extension possibilities. The system of custom C++ base classes helps artists in the team to create their own Blueprinted actors, components, data assets etc., and to set up different military units within minutes, while keeping everything performance optimized, without the need of in-depth knowledge of the whole system.
The plan is to convert the current code project into a plugin that can be used via a Blueprint example template, and to distribute it possibly on the Marketplace. The target is a really user friendly system despite its complexity, but for future users probably it would be the best practice to extend the base classes by a code project. Built onto the custom pathfinder and movement system, an integrated AI system is another great target (influence maps for building position planning, potential fields for army positioning, defensive wall building by using the pathfinder etc.).
- fast hierarchical pathfinding (low level: tiles, high level: clusters i.e. small areas), supporting ground and naval units,
- automatic map decomposition by a single actor providing the database of the pathfinder, evaluating terrain tiles and areas for the AI, with customizable map parameters (boundary size, tile size, cluster size)
- units can have different movement capabilities (by default 4: infantry, cavalry, siege/vehicle, ship) and different size (1x1, 3x3 etc. given in tile size),
- complex,** optimized unit update** including pathfinding, movement, avoidance, and collision resolution (priority based push-bounce), utilizing a LOD system in behavior too for better performance, smoothing out game thread CPU load by spreading the update over more frames, no actor ticking (only components),
- rendering optimized easily customizable unit actors and components: units are usually animated skeletal meshes in close view, and they switch to animated sprites over a certain distance (both is optional, it can be managed in unit Blueprints), but in the Blueprinted class any mesh component can be added (e.g. a stationary static mesh and some rotating static meshes as wheels for vehicles), nearly all of them has specific base classes added with proper default values,
- coherent group movement, custom formations, automatically resolving getting stuck or bottleneck situations,
- buildings can be obstacle like, or have walkable floors e.g. as** castle walls, ladders, stairs, and towers**,
- unit and group selection by single click or selection box, or double click to select all similar ones onscreen,
- Total War styled RTS camera system (can be easily restricted to top down only), separated from mouse click handling (which is done in PlayerController and HUD), thus easily exchangeable with own camera systems (using Pawn or SpectatorPawn class).
It is currently a single person project what I do in my free time, thus not lightning fast, but not slow at all. Since my primary aim is to create my own RTS game, and to convert it into a distributable tool is only secondary, I cannot say an exact date of the release.
Moreover, I need a little market research on: is there interest at all or the engine default NavMesh is good enough for developers; what would be the minimal acceptable feature set, or would it be better to wait a bit and provide more extensions; is the source code essential or not; pricing, support conditions, managing updates and bug-fixes etc. Any related suggestions welcome
What is sure is that I will put here posts about the **actual state of the development **regularly, and some other blog posts describing the system in details how it works and why certain solutions has been found to be the proper ones.
I am open to join existing RTS game developer teams, if we can find the common way, or I will establish one to realize the game of my dreams.
Beside game development, I am big fan of historical literature (Thucydides for president!), and ancient-medieval warfare (but also familiar with WW2 or modern weaponry and tactics) and its economical/social background.
When you see FPS or other performance related data, please take into account that I use an old laptop just over minimum requirements of UE4, more exactly: i5 2.5GHz, 6GB RAM, SATA HDD, AMD Radeon HD7670M 1GB GPU (with very rarely or never updated drivers thanks to Samsung).