At the moment I’m working on a game with a large amount of enemies and a large amount of data fed to them from custom objects the world around them that are interlinks. As a result there are a large amounts of arrays on each AI gathering information around them. is currently done every frame. I want to distribute these checks evenly over multiple ticks.
I have created a custom ForEachLoop that has a ‘Delay’ input, similar to the Epic YouTube tutorial, which I use for alot of data gathering and checking. However, if the delay is 0 (default) then I want the Delay to just wait for the current tick to end before proceeding with the next pass of the loop.
At a higher level & at a later date I also want to use new Node in a global AI that allows me to spread other checks across ticks, such as path creating, and possibly some collision detection too.
You’ll even see good A* searches (on low end hardware) spread their searches over multiple frames and final paths updating in realtime to reflect .
I’ve scripted in Lua, UnrealScript & C# in the past, but as a Designer I’ve not gotten used to the nitty gritty of C++ and have had the benefit of working alongside Code departments to handle that for me. As a result I want to use my first UE4 to bring me up to speed with all areas of the engine, and then my next one will involve me delving into C++. I have budgets and deadlines to consider so doing both isn’t feasible.
From past experience, UE3 wasn’t very efficient with characters, in earlier versions you’d get jsut 8 AI characters (before crowd actors came along) running well on consoles without going through kind of optimising process, and that was coming from working on Wii & Gamecube games where I was used to working with 40+ bipeds and 4 or 5 physics vehicles working on screen at once at 30fps.
There are plenty of articles across the web on distributing AI and collision checks over time to save performance. But doing over ticks is alot more efficient than just adding delays between results whilst dealing with variable framerates.