Home   Help Search Login Register  

Author Topic: Laggy waypoint types?  (Read 1750 times)

0 Members and 2 Guests are viewing this topic.

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Laggy waypoint types?
« on: 15 Mar 2010, 09:56:58 »
I've heard that waypoints can cause lag, and certain waypoint types are particularly laggy. Does anyone know of a few particularly bad ones? I imagine GUARD is the laggiest or close to it. What about HOLD or SEEK AND DESTROY?

What I'm looking for is a waypoint type that (a) doesn't terminate when the squad reaches it (like HOLD, GUARD, etc, not like MOVE) and (b) isn't very laggy. SCRIPTED is not what I'm looking for, I need a waypoint that will actually cause units to move towards it.

I have a multiplayer application in mind, but I post here since it's more of a general scripting issue.

Why would waypoints lag in the first place? They seem fairly simple to me, but maybe there's more to them than meets the eye. :blink:
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline Krieg

  • Mission Maker
  • Members
  • *
  • Who dares wins.
Re: Laggy waypoint types?
« Reply #1 on: 15 Mar 2010, 11:37:33 »
In my opinion, waypoints should not be laggy at all, with exception for those who actually cause an action (and they lag only if in large numbers), like "Get In" or "Get Out".

Technically you could make any waypoint not terminated, simply by making a condition that will never be true. The simplest way to do this is following:

1. Create a standard-issue move waypoint.
2. Create a trigger 0x0, activated by anybody once present.
3. Synchronize it with the waypoint.
4. Move trigger somewhere in deep ocean.

That technique works and is reliable, however, it might affect performance a little bit if in large numbers.
I think there are conditions in waypoint creation (I cannot test it, since my graphic card is "setDammage 1" and I am running on my reserve card, which does not support OFP), if I am right, then following is enough:

1. Create a waypoint.
2. Make a Resistance loon and place him way out of the mission area, so he might not be killed.
3. Name him ResLoon.
4. In waypoint condition write: "getDammage ResLoon == 1".

Not sure how that might affect the performance, though.
If you see a light at the end of the tunnel, then it's probably an enemy tank.

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Laggy waypoint types?
« Reply #2 on: 15 Mar 2010, 13:24:59 »
I don't think the Waypoints are laggy at all. It's the AI tied to those waypoints that begin to induce lag. AI have to continually calaculate, speed, formation, distance, direction and objects around them to maneuver around the map.

You can use a hold trigger or guard trigger which will never complete "UNLESS" you synch it with a switch trigger. The witch trigger can be controlled by a variable.

You are not very clear on what you are attempting to do but for examples sake....
place some waypoints...
MOVE<----------------------l
MOVE                                 l
MOVE                                 l
HOLD--------SWITCH           l
CYCLE-----------------------l

You could easily make a set of waypoints for safe mode, a set for aware, a set for alerted and then cucle them back to safe when all is well. Again, if I knew more about what you needed, I wouldn't be babbling on about things you probably already know.

To prevent lag caused by multiple AI simply limit the AI on patrol or whatever and then execute a script which spawns more to the group which will then return to formation when created. Sorry If I'm off target.

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Laggy waypoint types?
« Reply #3 on: 15 Mar 2010, 14:10:34 »
Technically you could make any waypoint not terminated, simply by making a condition that will never be true.

Oh hey, I forgot about that. :banghead:

Rather than using the trigger as you described, though, I think I can just put "false" in the conditions.

Quote
my graphic card is "setDammage 1"

LOL, good one, I like OFP scripting puns.

You are not very clear on what you are attempting to do

Sorry.

What I'm trying to do is get (1) several hostile AI groups to (2) move toward the general proximity of random players, even if players are not detected.

With my current mission build I have the AIs on GUARD waypoints and I have a looping script using setWPPos to adjust the waypoints to random locations close to players. I use GUARD waypoints because I need a waypoint type that can be setWPPos'd even after the group has reached it, and GUARD will also encourage the units to attack the players. But my concern is that the GUARD waypoints will be too laggy.

But now Krieg has given me the idea of simply using MOVE waypoints with condition false (just tested, it does work). It won't have the relatively advanced AI behaviour given by GUARD waypoints, but that may be just too much, anyway. For that matter I can just use the move command.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Laggy waypoint types?
« Reply #4 on: 15 Mar 2010, 23:18:20 »
Are you actually experiencing lag in your current build? How many groups do you have waiting around? Is it possible to delete any groups not needed(The waypoints will remain their but the AI will not be constantly calculating figures) You could then setwppos the waypoints and then spawn the group which will then move to that waypoint.

You can essentially reset any waypoint with a switch trigger and a Cycle waypoint. That means you could have the groups stay idle at a move waypoint, set the guard waypoint randomly change your variable to have them move to the guard waypoint(switch that variable back once they are on their way). After the damage is done at the guard waypoint, you could use another variable to acivate the switch(that is synched with the guard waypoint) which will send the units back to the move waypoint (or whichever waypoint you place the cycle WP next to)and stand idle again until that variable state is again swapped to true.

I can see now what you are trying to do but surely you don't need so many groups(that would induce lag) to achieve the effect. How many playable units are we talking about? And how many groups(maximum) are you needing for each? And how many units per each group(min/max)?

I suspect what you want can be achieved in a completely random way, e.g. Number of groups being sent to a location each having a random number of units and none of them having to be on the map at all until needed.

Am I completely missing the picture here?

BTW, not to dicourage you but if you intend to release your project on the OFPEC beta forums, we will have no way of testing or reviewing MP OFP or ARMA projects. Most of the staff with servers have moved onto Arma2 now and unless your scenario is SP compatible it may sit untouched on our boards. Sorry.  :-[

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Laggy waypoint types?
« Reply #5 on: 19 Mar 2010, 14:00:27 »
Thanks for the reply savedbygrace, sorry I didn't respond sooner.

Quote
Are you actually experiencing lag in your current build?

No, but that's singleplayer. Multiplayer opens up a new pandora's box of lag.

Quote
I suspect what you want can be achieved in a completely random way, e.g. Number of groups being sent to a location each having a random number of units and none of them having to be on the map at all until needed.

That's essentially what I'm already doing. So good idea, I guess. :D

Quote
BTW, not to dicourage you but if you intend to release your project on the OFPEC beta forums, we will have no way of testing or reviewing MP OFP or ARMA projects.

It's not a problem, I figured that one out already. I have a few buddies on CiA server who might be able to test/play it.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)