Home   Help Search Login Register  

Author Topic: logics vs object question...  (Read 749 times)

0 Members and 1 Guest are viewing this topic.

Grendel

  • Guest
logics vs object question...
« on: 09 Jun 2005, 20:35:07 »
Does anyone know for sure if it would save 'cpu cycles' by using an object such as an invisible 'H' as a reference spot rather than a gamelogic?

I think I've seen it mentioned somewhere that each gamelogic is treated as if it were a group, and the more groups you have, the more processing power OFP takes...

Does the invis'H' have any system gobbling properties and if so are there other no-poly objects to use in their place?  

Thanks,

-Grendel

UNN

  • Guest
Re:logics vs object question...
« Reply #1 on: 09 Jun 2005, 20:45:58 »
I'm not sure any of them could be classed as system gobbling. But the Invisible H must be smaller (resource wise) than game logics. Probably something classed as a NonStrategic Building, with no p3d, would be the smallest?

Other than the ones I've made myself, don't know if there is anything that comes with OFP as standard.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:logics vs object question...
« Reply #2 on: 09 Jun 2005, 20:49:40 »
Welllllll........The invisible 'H' uses the empty.p3d model file.

This model file has one LOD which is a Resolution LOD, which has no vertices, no faces and nothing else either.

It is as the name suggests......empty.

Having said all that, I think the 'Logic' object also uses the empty.p3d.


Planck
« Last Edit: 09 Jun 2005, 20:50:46 by Planck »
I know a little about a lot, and a lot about a little.

UNN

  • Guest
Re:logics vs object question...
« Reply #3 on: 09 Jun 2005, 21:02:18 »
Game logics are more akin to Men than anything esle and they can be used for a variety of things. So they have additional properties to the invisible H.

The invisible H has code\properties only associated with helicopters landing.

Grendel

  • Guest
Re:logics vs object question...
« Reply #4 on: 09 Jun 2005, 21:26:39 »
Thanks for the input so far guys,

Quote
The invisible H has code\properties only associated with helicopters landing

Do you know if this is something the invis'H' is 'actively' calling i.e. is it searching for a helo at all times waiting to trigger land codes, or are the helo's searching for the 'h' themselves when the AI is trying to land?

I know this seems kind of frivolous, but I am needing a lot of unique objects/logics to use as reference points for various script functions, and I am obsessive about being thrifty with my rescources (I'm working with a 1.5 after all...)

-Grendel

UNN

  • Guest
Re:logics vs object question...
« Reply #5 on: 09 Jun 2005, 21:58:39 »
Quote
Do you know if this is something the invis'H' is 'actively' calling i.e. is it searching for a helo at all times waiting to trigger land codes, or are the helo's searching for the 'h' themselves when the AI is trying to land?

I just checked it's config, the Invisible H is NonStrategic. So it probably is helicopters looking for just the class name, rather than anything else.

Dont know much about whats involved with landing helicopters. Is there a chance it could confuse\conflict with other aspects of the mission, if you did use lots of them?

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:logics vs object question...
« Reply #6 on: 09 Jun 2005, 23:16:21 »
Unless you are using hundreds of them I doubt you would notice the difference in cpu load

UNN

  • Guest
Re:logics vs object question...
« Reply #7 on: 10 Jun 2005, 00:41:23 »
I was thinking more about helicopters mistaking Grendals Invisible H's for ones placed specificly by the mission maker.

If you say Heli land, does the helicopter look for the nearest landing pad, or one passed as a parameter? Like I said, I have just started messing around with helicopters.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:logics vs object question...
« Reply #8 on: 10 Jun 2005, 12:14:02 »
It looks for the nearest place it wants to land, which might be a flat piece of land some way off rather than an invisible H that is close by but on a slope.  I get the chopper down really low (5 or 10) before telling to land if I am fussy about where I want it.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:logics vs object question...
« Reply #9 on: 10 Jun 2005, 12:25:06 »
Why not use triggers as reference points??
You can create them (but not set any properties for them of course) with camCreate... Their classname is "EmptyDetector"...

You just name the triggers like you would name your gamelogics/invHs/etc and you can get their positions, probably even direction (havent tested that one)...

For the main question I would say use gamelogics, since the game engine clearly tries to persuade a chopper to land on a invH so the chopper will estimate whether to land on that or not, and if it's not on a level ground it will try to find a level ground to land instead...
I would bet that causes a heck of a lot more cpu load than gamelogics...

Also, gamelogics use the simulation="invisible" (or something like that) which gives it it's own characteristics very different from say regular Man...
People always seem to forget the 'power' of simulations when comparing objects/etc..

Simulations are that hardcoded stuff that seem to tell to the game engine which values are used from a certain vehicle class for example..
So even if you put values that are used for a tank class vehicle on a car class vehicle they will not work because the simulation="car" disregards all the tank related stuff...
But this is just speculating and getting off-topic :P ::)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

UNN

  • Guest
Re:logics vs object question...
« Reply #10 on: 10 Jun 2005, 13:27:58 »
I ran a quick test script on Everon to see what effect they would have on frame rate:

Code: [Select]
_Type=_This Select 0
_Pos=_This Select 1

_Count=0

#L

_T=_Type CreateVehicle _Pos

~0.001

_Count=_Count+1

If (_Count<999999) then {goto "L"}

Hint "End"

I watched the framerate over 2 minutes. After 2 mins Helipads returned 15 fps, Game Logics 14 fps and EmptyDetectors 19 fps.

Not very scientific but it's gives you an idea, more time and effort setting up each test mission would give more accurate readings.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:logics vs object question...
« Reply #11 on: 10 Jun 2005, 14:43:35 »
Ah well... ::)
I should never open me mouth, UNN beat it shut again ;D ;D

So clearly if you Grendel only need positions as refrences then you should definately go with 'emptydetectors'...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

UNN

  • Guest
Re:logics vs object question...
« Reply #12 on: 10 Jun 2005, 14:52:47 »
Quote
Why not use triggers as reference points??

Your gut instinct was right  ;) Normaly I would have shyed away from using empty detectors, so my curisoity got the better of me :)

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:logics vs object question...
« Reply #13 on: 10 Jun 2005, 16:18:00 »
I just can't get it, why you don't use position arrays anyways.

If you have to place a GL/invisible H/empty detector somewhere
on the map, then why not just to find out the coordinates, and
use those later in the mission, instead of using trigger or unit
resources?

Summary:

in mission editor find out coordinates
(write them down somewhere)

in mission use these coordinates

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Grendel

  • Guest
Re:logics vs object question...
« Reply #14 on: 10 Jun 2005, 20:48:39 »
Quote
I just can't get it, why you don't use position arrays anyways

Well, the chief reason is that I need reference points I can use in conjunction with the distance command dynamicly within the game.  Some reference points cannot be static.

I could use 2D arrays, and the function to get the distance between them, but then I would have to make my scripts a lot messier than they already are to achieve the same result (essentially it would be manually scripting what the distance command/function already does in the first place)...plus I would have to store arrays within arrays and all kinds of other carpal tunnel inducing extra typing.

So basicly I'm lazy :D

I'm pretty sure the 20 or so unique reference objects won't tax the system too much more than manually scripting an existing function's job.

Thanks for the tip and testing on the emptytrigger, never thought of that!

-Grendel