Source Structure

These are the listed main directories in Source/RTSFramework/Private in alphabetical order. Detailed explanations of the main classes and systems will be available in their respective section.

1. AI

Contains all the logic (conditions and tasks) for State Trees, which are the primary driver of entities' behavior. We have two distinct classes of AI:

1.1. Battalion

Entity Handles that contain one or more units will also have a battalion state tree that moves and controlls the behavior of the battalion. Since users only interact directly with entity handles, most of the logic to control entities starts here.

1.2. Unit

Each unit will also have their own State Tree component, which is mostly controlled by the battalion one.

2. Abilities

Abilities of GAS (see our GAS documentation). For now WIP and only used for combat (applying weapon damage to entity health)

3. Components

All the actor components that are owned by units, buildings, controllers etc.

4. Controllers

Gameplay controllers (view Controllers Architecture documentation under Code Architecture).

5. Entities

Entity - gameplay actor that is interactive for players. Basically it's a unit or a building. View the Setting Up Assets folder for further documentation.

5.1 Buildings

Contains subtypes of ARTSBuilding, such as resource buildings, rubbles or walls. We might want to refactor this to use components over inheritance in the future, for a more flexible approach.

5.2 Entity Configs

Entity configs are the main data entry points for entities. Since we don't spawn actors derived from ARTSEntity, ARTSUnit or ARTSBuilding directly, this data assets allow us to personalize each actor's data to represent different types of units, buildings, etc. More on this can be found in the documentation under Code Architecture > Configuration System

5.3 Units

Contains subtypes of ARTSUnit, such as builders or heroes. Same as buildings, we might want to refactor this so that it's based on configuration or components rather than inheritance.

5.4 Weapons

Reusable configs and classes for weapons.

6. Enums

Enums for anything. It also contains some other types (structs mostly) so we should consider renaming the directory.

7. GameObjects

Other Actors or UObjects that exist on a gameplay level but not directly controllable by Player like Entities. GameMode, GameState, PlayerStart, PlayerHandle, PlayerCamera, Niagara renderers, etc. Also contains Resources directory with classes for each gameplay resource.

8. Mass

Contains the relevant classes and data types that implement the MassEntity framework utilities. This is mostly related to high performance systems such as movement, projectile simulation, etc. Traits, Tags and Fragments define the entities themselves and the data they are associated with.

8.1. Processors

Processors are the main agents to run logic on the Mass framework. For example, the movement processor will contain the logic to run movement.

8.2. Rules

Since movement is based on a Boid simulation, the rules determine how entity forces are calculated. Subdirectory Battalion contains specific rules for battalion movement.

8.3. Utils

Classes related to Mass.

9. Networking

Utility classes for custom networking scenarios.

10. Settings

Classes derived from UDeveloperSettings. Used to store general data about the game settings, debug information, and game configuration in general.

11. Structs

General purpose structs. Maybe some of the ones in Enums should be moved here or both folers merged.

12. Subsystems

Useful singleton-like managers. We used them as glue between the gameplay code and Mass (for example in the case of the Unit Subsystem) or to handle general systems conveniently.

13. UI

Classes and widgets for the UI that is shown ingame, including data objects that will represent entities, spells and upgrades when displaying those in the UI.

14. Utils

Collection of different general purpose functions, libraries, classes etc., for maths or common game logic.