Cover image of Dev Report #20

ATTENTION

Welcome to another Dev Report! In this report, we'll delve into some recent changes introduced in our latest minor update. Moreover, we're excited to share insights into our ongoing projects as we step into the new year, providing a sneak peek into the upcoming Major Updates on our developmental roadmap.

INTELLIGENCE

Our first minor update of the year, update 1.0.0.95, primarily consisted of a massive batch of fixes and optimizations to increase stability and performance. While we know that the community is eager for new features and assets, we felt it was crucial to significantly improve the state of the game before implementing anything new.

As you may have experienced, over a long-running Conflict match, discarded weapons, bodies, vehicles, and other extraneous assets tend to accumulate on a server. If they are not removed, either manually (by someone with Game Master privileges) or automatically, they will cause the server FPS to drop, resulting in poor server performance. In 1.0.0.95, bodies, items, and vehicles are now correctly deleted, resulting in fewer assets accumulating and a lower chance of servers getting bogged down due to extraneous assets. To accomplish this, we temporarily reverted to the old GarbageManager entity, and in the next Major Update, we plan to roll out a revamped system for garbage collection.

This update also addressed 6+ persistent crashes related to turrets, vehicles, and the inventory. In addition, several VMEs (null pointers in a script that can have an impact on stability, sometimes even leading to crashes) thrown by various interactions were solved, which should result in smoother server performance.

One interesting feature that we added in this update was the Random Weather Changes parameter in the mission header. When enabled, this parameter will change the weather randomly throughout the match, creating a more dynamic and varied environmental ambiance.

OPERATIONS

AI Cover System

If you’ve been disappointed with the current AI’s tendency to stand out in the open and generally act oblivious to the danger surrounding them, you’ll be happy to hear that we’re implementing an AI cover system. Now, AI will take cover and hide during combat or when they sense danger, making them more formidable opponents and generally behave more realistically.

Cover positions are points where characters can stand, crouch, and shoot while being partially protected from enemy fire (e.g. areas behind boxes, barrels, fences, etc.). The AI cover system provides data to AI infantry about cover positions in the in-game world. 

One very common reason why AI sometimes comes across as "not very intelligent" is their inability to behave and react adequately in the in-game world (and we have a remarkably complex in-game world). Until now, AI infantry have had very poor awareness of their surroundings. They have only been aware of friendly and enemy units, vehicles, danger events (like gunshots), and navigation (represented by navmesh). The cover point data provided by the AI cover system extends AI awareness of the in-game world, making them smarter and allowing them to utilize their surroundings world more extensively and effectively. 

Before we look into how cover point data is generated, let's take a look at our requirements for a cover system. When considering what objects might provide good cover during combat, the first things that come to mind are typically boxes, fences, barrels, and big stones. One approach could have been to set up all of these prefabs manually by adding cover point data. However, the number of such prefabs is enormous, and some cover positions could be produced by the unusual orientation of prefabs which were not meant as cover points originally. It would also be out of the question to mark those positions manually in the world, given the size of the in-game world and the amount of map designer work it would require.

Based on these criteria, we decided to approach cover point generation based on geometry data alone, without explicit configuration in prefabs. So, our cover points are generated during navmesh generation, which happens either when you, as a map creator, regenerate it manually in Workbench, or at game run time, when a dynamic composition is placed (e.g. by the Game Master), or when something is destroyed (a fence is destroyed and thus the area is passable and we must regenerate navmesh).

We start looking for cover points by checking multiple positions along the edges of the navmesh. Any navmesh edge or hole indicates that there is either a cliff, a terrain edge, or some object - one that can potentially be used as cover. For each potential cover point, we check if the object in front has reasonable dimensions to provide adequate cover. Since we generate cover points during navmesh regeneration, we also utilize navmesh height field data for geometric checks. Height field data represents rasterized geometry in 3D space, like voxels. This is useful because we can perform geometric tests very fast, which is essential given the large number of potential cover points we need to test. Finally, once the cover points are verified, they are stored in the navmesh files.

We have enhanced several AI behaviors to utilize cover point data. The most important enhancement is the AI soldier's combat behavior. Soldiers will be able to occupy cover points during engagement with the enemy and hide behind cover when reloading or suppressed. Cover usage logic also depends on the distance of engagement. For instance, during long-range fights, AI soldiers will prefer to stay in cover and not run into the open. The second most important AI behavior we have enhanced is their reaction to gunfire. When being shot at from an unknown location, AI soldiers will try to occupy nearby cover points that can serve as protection against the enemy or spread out if there is no cover nearby.

We have also enhanced other minor AI behaviors to use cover points. For example, we have added cover point usage to grenade avoidance behavior, defend waypoint behavior, and idle behaviors. We think that cover utilization will make AI soldiers more interesting to play against for two main reasons: fights against AI soldiers will last longer, and you will now have the opportunity to suppress and flank them.

Since this is the first iteration of the AI cover system, we still have work to do, and have already identified a few things we would like to improve:

  • Currently, we do not generate cover points for leaning sideways from an object or wall edge;

  • Thus, we do not generate cover points around trees or poles;

  • Cover points are not generated around vehicles;

  • Cover points are generated at windows, but they are often not located at the window's center;

  • Currently, it is possible that AI soldiers can select a cover point with poor visibility on their target.

AI Smoke Grenade Usage

AI infantry have been able to use grenades for a while, but soon, they will also be able to use smoke grenades to provide cover for themselves. This will add a new dimension to PvE gameplay, as AI has yet another tactical tool at their disposal, making them more challenging opponents on the battlefield.

Our overall mission is to enable AI to use smoke grenades in a tactically effective way and use smoke cover to gain an advantage.

When designing this feature set, we wanted to look into smoke usage in combat overall, not just smoke grenades by infantry, so we could get a more complete picture of the role of smoke in combat and plan for the future inclusion of vehicles and artillery. We decided that the first “prototype” case to implement would be smoke grenade usage in medic behavior (i.e. when medics help unconscious teammates).

To gather as much information as possible, SzwedzikPL, the dev in charge of this feature, began discussing with his Arma 3 group to gather community ideas and validate internal assumptions. The group went ahead and made a video illustrating combat behaviors with smoke grenades to highlight various ways smoke can be used in military situations.

This video and discussion with the community turned out to be invaluable in the design of this feature, so we wanted to take a moment to give a big shout-out to Arma4Ever for their input!

As there are a wide variety of situations where smoke deployment can be used effectively in combat, we needed a solution that could be used as an “extension” of some behaviors we have already implemented and could be easily integrated into many behaviors if necessary. As a result, we came up with the concept of “Activity Features” that AI activities can integrate and use. "AI Activities" refer to specific AI group behaviors, for instance moving somewhere as a group, getting into a vehicle as a group, or in this case, healing someone as a group behavior. Our very first activity feature was the “AIActivitySmokeCoverFeature."

Activities can customize their activity features if needed. The medic heal action customizes the smoke cover feature in a way that will “tell” the smoke cover feature what is important for this activity (e.g. patient position, who has been designated by the group to be a medic, etc.). Additionally, the smoke cover feature also allows activities to define properties to customize how smoke cover should be deployed.

Currently, AI can deploy smoke to cover a position with smoke, to protect a given position with smoke (i.e. to deploy cover in a way that the position is completely hidden by smoke, not just covered by it), and to protect a given position from recognized target clusters (so that the smoke cover will be deployed in places that will hide given position from known enemies). Overall, this is just the first part of a more comprehensive solution that will also include requesting smoke from artillery or vehicles.

Our new solution in Arma Reforger brings AI usage of smoke grenades to a different level. This is the first time in Arma history that AI soldiers will be able to use smoke grenades more tactically based on some more sophisticated logic checks as to if, where, and how to throw smoke grenades. They will be able to use smoke in many more situations and in different ways depending on various conditions.

The first challenge was to decide how we wanted the AI to be able to use smoke grenades. After consultation with the aforementioned Arma 3 group, the use cases were clarified, but then it took some time to figure out how to scope it sensibly for Arma Reforger while still providing something truly new for players. Now, the challenge will be refining this feature scope for Arma Reforger, and subsequently expanding upon it in new ways for Arma 4.

Another challenge was implementing this feature as a “reusable extendable service” for AI. Making it easily usable with many behaviors wasn’t obvious from the beginning, and some aspects were particularly difficult to balance. For example, part of the smoke cover feature logic requires deciding which members of a group should be picked to throw grenades. This logic looks at members and tries to pick the “least important” soldiers closest to the target position (e.g. we try to avoid ordering machine gunners who should be firing and suppressing the enemy to throw grenades). Balancing this selection process, the relation to role versus distance, etc, along with many other relevant factors, proved to be quite a tricky process.

Limitations and planned improvements:

  • At the moment, medic healing is the only action that supports smoke cover, but more behaviors will be integrated in the future.

  • Soldiers can only use smoke grenades to deploy smoke cover. In the future, we plan to add smoke ammo for UGLs, but it has yet to be decided whether this will be implemented in Arma Reforger or saved for Arma 4. However, the AI solution for UGL smoke ammo usage is already prepared.

  • AI agents can’t see through smoke, but this does not influence the movement and pathfinding (i.e. agents will move around and through smoke as if it wasn't there). In the future, we plan to implement a solution to inform agents that an area is covered with smoke and should be avoided.

  • Logic about aborting and refusing to deploy smoke cover is still a work in progress. We plan to implement conditions to allow groups to decide not to use smoke cover due to specific circumstances (e.g. a soldier is wounded and the group wants to cover the medic to get to him, but the patient is inside a house, so throwing a smoke grenade next to him is probably not the smartest idea).

  • For the scope of Arma Reforger, only reactionary use of smoke cover is planned. Smoke cover will only be used in response to various events like someone getting wounded, a group retreating, or a group getting suppressed and wanting to break contact, etc. More complex AI smoke cover usage is planned for Arma 4.

  • The smoke cover feature is not yet fully integrated with the AI cover system. Soon, a cover state will also influence decisions about using smoke grenades (e.g., not covering a patient with smoke if he already has cover, etc.).

Both the AI cover system and AI smoke grenade usage will be included in an upcoming update, so we hope you enjoy battling your newly upgraded AI enemies.

AI Driving

As one of the most requested features for Arma Reforger, we wanted to let you know that it’s in the works.

The backbone of AI driving is the connection between two systems: (vehicle) navmesh pathfinding and a (pre-processed) road network. This gives us an effective way for AIs to find their way across large swaths of terrain: they find the way to the nearest road, use the road network, and then find the path to the target destination. Dynamic modification of the road network via Game Master (i.e. placing assets like roadblocks) results in road segments being disconnected or reconnected, prompting the AI to find a different path.

When assets are placed to partially obstruct roads (e.g. an asset that blocks one side of the road), this results in partial disconnection. The problem now is that the AI cannot detect the partial disconnection of road segments and will try to find a different path, even though they could feasibly navigate around the obstruction. We are currently working on a solution to enable AI to distinguish between full disconnection and partial disconnection of road segments.

In addition, we support vehicle navlinks (e.g. vehicle gates, bar gates) and custom behavior for the driver to go through them. This means AI drivers will be able to stop, get out of the vehicle, open the gate, drive through, and close the gate.

The resulting path of the vehicle is then processed by various elevation and angle checks and provided to the vehicle movement component and PID controllers that simulate the driving inputs of a human player. Our driving model controls the vehicle via the same inputs as would be used by a human player when driving. Tuning the PID controllers for thrust and steering proved to be challenging, but it seems we have managed to find the golden values for each of our vehicle models. In some cases (e.g. with certain curvy roads), the results are quite impressive, and the AI driving model even outperforms a human driver in terms of speed and stability on the road (see video below).

We are currently developing support for single groups to be able to move in formation with soldiers both inside a vehicle and outside of it. Later, we plan to extend this to multiple vehicles driven by the same group (aka convoys). This required us to support multiple pathfinding requests to the same location and proved to be a particularly hard nut to crack. In the end, we managed to resolve it by creating a "subformation" with a specific leader for each request.

AI driving is still a work in progress, but we hope to implement it in one of the upcoming Major Updates.

LOGISTICS

Our Audio Lead, Filip, also recently took a closer look at the ambient soundscape he created and its technical inner workings. If you're interested in audio design and implementation, then we recommend watching this.

We also posted another video from our Reforger RFI series on YouTube! This time, Creative Director Ivan Buchta was happy to sit down and shoot the breeze on some of your community questions. 

Once again, we’d like to thank our amazing community for their continued support. There are more updates in the pipeline, and we’re very excited to show you more of what’s coming, so stay tuned, and see you on the battlefield!

Published on 

We want you for our mailing list!

We offer great content once a month just for you!