Heresy RTS job system and progress update
In the last entry of my blog I discussed basic design of the combat system for Heresy RTS. During the last two months I have been very busy with refactoring multiple systems to make them easier to extend. I have also designed and implemented a robust job system that allows for harvesting resources, building structures and collecting items. This blog entry will focus mainly on the job system.
Job system basic information
The job system relies on two main pillars. First is the Resource class which can be applied to to most game objects. The Resource class determines what an object is (Resource type) and what can be done to it (Job type). In the screenshot below we see a Resource type of Wood and a Job type of Chop:
When a player selects a unit and right clicks a resource an efficiency check is made. Each unit has a base Job Efficiency statistic which is further modified by equipped weapon’s Job Efficiency. If a given weapon’s Job Efficiency is higher than 0, then it means it is suitable given job. Below you can see an example weapon with its associated Job Efficiencies:
The unit will approach the resource and start working. In case of a tree, the unit will perform chopping and each chop will have a chance to generate resources. When the tree’s resources run out and at least 1 resource is generated a product is generated. In case of a Tree the end product would be wood logs, as seen in the screenshot above. This is also a Resource, also of type Wood, but it has a Job Type of Carry. This means that the unit will now pick the resource and will need to carry it back to HQ or warehouse and drop it there. A short demonstration is available in the video linked below:
Job system implemented features
For now the game has the following job system features implemented:
- Resource harvesting of Wood and Food.
- Picking up small resources and weapons.
- Carrying large bundles of resources.
- Placement of buildings in the world and construction of buildings.
Additional progress information
In addition to the job system described above, I have also progressed in the following areas:
- Refactored lots of “under-the-hood” stuff to make the game more easily extensible. This includes updates for unit AI, behaviour, health and statistics.
- Created system for UI tooltips and unified some UI/button functionality.
- Implemented unit production and upgrades within constructed buildings.
- Implemented healing buildings.
- Designed and implemented the entry level tier of equipment: improvised weapons and basic tools.
- Designed and implemented animated lootable containers and loot lists.
- Created a script that randomized unit models, especially useful for Synty Studio’s modular character set.
I will show some of the new stuff in the future entries.
1 Response
[…] hard at work on an AI system that governs how AI actors behave and interact in the game. While the previous post focused on peaceful part of the game, today we will see some […]