Home   Help Search Login Register  

Author Topic: Computer load/bandwidth hits with lots of units  (Read 1310 times)

0 Members and 1 Guest are viewing this topic.

Rocko Bonaparte

  • Guest
Computer load/bandwidth hits with lots of units
« on: 09 Jan 2005, 20:16:01 »
This isn't so much a scripting discussion moreso than multiplayer mission creation in general.  I'm working on a rescue mission where a human-controlled helicopter unit has to link up with a human-controlled downed squad.  The one important script is randomizing the downed squad's start location.  With a large, random spawn area, I then started adding roadblocks and patrols all over the place.  I felt this would keep things interesting, but now there are a ton of units.  This was made worse when adding some AA vehicles and soldiers to keep the helicopter pilot busy.

When I fly the helicopter around, things start to crawl.  All the enemy units get tipped off to the helicopter and want to fire on it.  The computer slows down . . . and this is just from the mission editor!  

I have the impression the mission is too bloated, and that I'll have to drum up some tricks to reduce the number of units.  What I'd like to know is how many total AI units I can trust to have running around on something like an Athlon XP 2000, 512MB RAM for a server with everybody connecting via cable modem.  

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:Computer load/bandwidth hits with lots of units
« Reply #1 on: 09 Jan 2005, 22:32:55 »
The exact number you can keep going without loading the server too much is anyone's guess. Practical tests using the server admin command "#monitor" will show you some stats on the dedicated server load.

However, don't lose hope just yet  ;D

I suggest you check out and try to use the "AI On Demand" system bn880 of CoC fame has been working on. This will let you put a shedload of units in the mission. The AIOD system then puts them "in stasis" (essentially despawns them) and will later bring them back to life according to your mission's needs.

The groups that are removed on mission start are later brought back to life depending on what condition you set for their return to action. The groups will retain their editor-placed waypoints and get back to work as soon as they are spawned back.

Refer to this thread on the official BIS forums: The Bastige Island 6 which is bn880's "poster child" AIOD mission. The core AIOD system is available as a separate download too, in the first post of said thread.

Currently there isn't much of any documentation or any tutorial, but check the readme.txt in the subfolder of the AIOD folder. Opening the mission itself is also a good way to check out how things are done. In short, the process is:
  • Create your mission as you usually would and don't be shy to add more groups than you think is possible
  • Place a big trigger, "Anyone present", "Repeatedly" covering the whole mission area. Name the trigger "CoC_MainTrig"
  • In the init line of each group leader whose group should be removed, put a call to add that group to the system (see below)
The init line call looks something like this:
Code: [Select]
[this, <condition code string>] call loadFile "CoC_AD\addGroup.sqf"Where <condition code string> is periodically evaluated to see if the group should be brought back. When it evaluates to "true", that happens. Some examples:
Code: [Select]
{counterattack}      -      group will be respawned when counterattack is set to true
Code: [Select]
{_d < 1000}       - group respawned when any of its enemies are within 1000 m
« Last Edit: 09 Jan 2005, 22:34:07 by Killswitch »

Rocko Bonaparte

  • Guest
Re:Computer load/bandwidth hits with lots of units
« Reply #2 on: 10 Jan 2005, 03:10:14 »
That sounds very ambitious.  Would you know how it could perform on a mission that involves a helicopter?  My initial impression for this mission was to use it to remove all static defense posts that are too far away from another to matter.  However, a helicopter could whiz by all of them and attract gunfire.  I'd at least want them to be present as the helicopter passes.  

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:Computer load/bandwidth hits with lots of units
« Reply #3 on: 10 Jan 2005, 04:28:12 »
It works fine in missions involving helicopters too. Of course, by flying around an island, you run the risk of waking up all the dormant AI:s.

(Note: That is not strictly true, it depends entirely on what condition you set for the enemy groups' recreation.)

What you can do is have the AA sites/soldiers be re-created when players (in a helo, for example) gets too close, but have other parts of the enemy resistance be recreated for other reasons, say, certain objectives having been completed or any other system of portioning them up you can think of.

Sky's the limit here. (Actually, OFP's 63 groups per side is the limit  ;D ).

You'll find three examples of MP missions involving shedloads of enemies (and players) here: Jinef's AIOD Missions

We play Bastige Island and Jinef's missions regularly in MP on the Zeus game servers and are having a blast. AIOD isn't limited to MP play though, and will work fine in SP missions needing to have lots of units.
« Last Edit: 10 Jan 2005, 04:44:26 by Killswitch »