Project Infinity Influence Map

First demo with decals enabled:

Second demo with decals toggled on and off to show the performance of the system when decals are enabled vs. disabled:

This map is hideous.

Yeah it is.  This is a sandbox-test map that I use to demo anything before putting it into a “real” map.

How does it work?

It is a double buffered event-driven influence map that is based off of this article by Alex Champandard.

It appears to update in rows.  Why is that?

The amount of grids that are updated per tick (from the server’s perspective) are editable in the actor details panel on the right side of the picture shown below.

It updates a limited number of grids per run to keep the overhead low.  Setting the “Updates Per Tick” value to 0 results in it updating all of the grids at once.

What is the purpose of the influence map in this game?

The purpose of the influence map in this game is to simulate areas of control by the different factions within the game to indicate to the AI where it should focus their efforts.

What is the “BP_Outpost” that was added to the map?

The BP_Outpost added to the map is a constant influence point that the AI will construct to add spawn points closer to the front lines of battles.  The BP_Outpost, in its current state, adds no true gameplay ramification outside of the influence applier.  In the future, it will add spawn points to the world.

What does all of this lead to?

The goal for this is to create a system wherein the actions of the players or the NPCs can sightly shift the behaviors of the NPCs in the world.

What still needs to happen in the influence map?

  1. Performance upgrades
  2. Adding support for multiple factions
  3. “Smarter” spawning – Some of the grids being spawned simply can’t be pathed to, so spawning them in the current way is suboptimal.

What kind of performance upgrades are you looking at doing?

Now I’m going a bit on the technical end.  Right now, it spawns an actor for every single grid square.  That is horrendous, performance wise, although kudos to the Unreal Engine for being able to handle over 250,000 actors being on the map.  These are not ticking actors.  Only the original “InfluenceMap” actor is a ticking actor, and it chooses small subsets of the population to update.

I have a plan for a major performance overhaul which does involve moving away from actors for the influence grid and moving to a far, far more efficient system.

How large have you expanded it to?

512×512 is the highest I have managed to get into a game.  It is around 6 GB worth of influence map data on its own, although that is partially caused by them all being actors, and it is VERY obvious whenever a chunk updates.  So, that made it painfully obvious that I had to completely overhaul my system.

That seems excessively large.

It is.  Especially since no performance upgrades have been done yet.  This is the goal, though.  512×512 is the “target” for my project.  My project’s world map is intended to be split into an 8×8 grid of 64×64.

When is the next update planned?

I want to have the next implementation of the influence map ready to go by the end of next weekend.  I won’t have the debug visualization completed by then.

 

Hopefully I will have more specifics for the next blog post.

 

Leave a Reply