Home   Help Search Login Register  

Author Topic: Guerilla Warfare  (Read 2339 times)

0 Members and 1 Guest are viewing this topic.

Kinnon

  • Guest
Guerilla Warfare
« on: 04 Apr 2003, 22:27:49 »
Man, i'm having a fun Friday night.

Am i clubbing ? Nope.
Am i making lurv ? Nope.

I'm LISTENING to OpFlash !

Yup, that's right, listening.

I'm working on my recon squad for the Guerilla Warfare AI Engine.

I kept wishing they could hear, because you hear a vehicle LONG before you see it, so i did some tests.

Placed myself on Jungle Everon, placed a helicopter a few kilometres away, a quick script to repeatedly 'hint' the distance and here we are :

You can hear .

Helicopters 2Km away.
A10's 1.5Km away.
Tanks 500m away
Jeeps/Trucks etc 250m away.

So now my recon units can hear. At the moment the only reaction they have is for a helicopter, if they hear a chopper they run to the nearest forest and wait until it's passed :)

I'm a sad f**k ;+}

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:Guerilla Warfare
« Reply #1 on: 05 Apr 2003, 11:19:13 »
I'm very interested in this script and wrote some comments in the other thread 'dynamic opf'. Can i suggest that you use only 1 thread as a basis, so i know where to reply to ? Just a hint  ;D

Kinnon

  • Guest
Re:Guerilla Warfare
« Reply #2 on: 05 Apr 2003, 15:01:55 »
OK, will stick to this one, thx for advice :)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Guerilla Warfare
« Reply #3 on: 05 Apr 2003, 19:04:19 »
i think usin knos about wil b beter cuz think bout it

in real world (didnt try OFP :P) dere is difrence from were u can hear vehicle depending on treain - like if its behind mountian ?

c wat i meen ?

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Kinnon

  • Guest
Re:Guerilla Warfare
« Reply #4 on: 07 Apr 2003, 19:48:01 »
That's true LCD, but i'm basing it on what i could hear in the game, so unless OFP is coded to not be able to hear through mountains and the like then i'll just have to put up with it.

LAGUnknownSoldier

  • Guest
Re:Guerilla Warfare
« Reply #5 on: 08 Apr 2003, 06:00:46 »
so , in theory , your Ai could ambush troops as they march down a trail by "hearing"the distance they are away and triggering the Ai to become hostile or move into a cooridon.
this is cool but how will you make the Ai distinguish between vehicle and men?

Pandoz

  • Guest
Re:Guerilla Warfare
« Reply #6 on: 08 Apr 2003, 06:28:34 »
who cares...nothing CANT be solved when high explosives are used:) ummm LCD does have a good point but i think that hearing something can be just as scarey as seeing it in a game sometimes *cough* shilkas while ur on foot *cough*

Kinnon

  • Guest
Re:Guerilla Warfare
« Reply #7 on: 08 Apr 2003, 13:44:18 »
LOL re:shilkas !

Well, it's not as sophisticated as it sounds, all i did was sit in-game with different vehicles coming toward me while a script displayed their distance from me, so i then had a list of at what distances i could here different vehicles. Footsoldiers are seen before they are heard BTW.

So all the script does is measures the distance of all enemy vehicles from a particular recon unit, and if a chopper is closer than 1.5Km then they have heard it, if an M1A1 is closer than 500m then they have heard it, if a jeep or truck is closer than 250m then they hear it.

Then the script knows which vehicle it was but i want to script it as fairly as possible, so the recon group treats the vehicle making the noise as an unknown and runs to the nearest forest until the vehicle passes. That was fun, plotting out the centre-points of all the foresty areas on Everon !

I'm a scripty newb though, and kind of haphazard in method so i'm making loads of silly mistakes at the mo but it's coming along.

Offline Spinor

  • Members
  • *
  • I'm a llama!
    • The chain of command
Re:Guerilla Warfare
« Reply #8 on: 10 Apr 2003, 16:02:04 »
I think that OFP already takes into account hearing in some way. Did you also display the knowsAbout value in addition to the respective distance? This test could be interesting.
The problem with only checking the distance could be that you also have to check the type of a unit (as you said, different hearing ranges) and maybe also the state (e.g. stationary tank versus top speed).
I don't know how sophisticated the knowsAbout value is, but some of the above things might be already included.

Kinnon

  • Guest
Re:Guerilla Warfare
« Reply #9 on: 10 Apr 2003, 17:13:28 »
Thanks Spinor, excellent points.

I'll do a check displaying KnowsAbout values as well as distance, and i'll modify the hearing so that it checks wether the unit in question has moved a reasonable distance.

Funny thing about KnowsAbout is it just in the range 0-4 AFAIK, not textual info or descriptions of some sort, also, how can i access a units description, ie;M1A1 Abrams, instead of just ' "Tanks" countType _knows ' ?

This game is so deep it's mad !

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Guerilla Warfare
« Reply #10 on: 10 Apr 2003, 18:15:13 »
i think u can try da typeof command ;D

if (typeof unit == "somtyhin") then {somthin}

 ;D

LCD OUT

"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Kinnon

  • Guest
Re:Guerilla Warfare
« Reply #11 on: 10 Apr 2003, 18:40:05 »
Thx LCD, i'll give it a go ;+}

Kinnon

  • Guest
Re:Guerilla Warfare
« Reply #12 on: 18 Apr 2003, 17:30:52 »
Damn, damn, damn ...

GW is now in a state where it is fairly useable and fun to play, BUT, the whole point of this was to have an opponent for CE2, unfortunately with both of these multi-script (GW has 22 scripts and is still unfinished) projects running at the same time it becomes unplayably slow :(

What i don't understand is that it runs fine at first, but gets slower and slower as time goes on, i thought it would be fine as units die there is less demand on CPU but no :(

I am now officialy depressed !

I may have to do my own, simple Command Engine, not half as sophisticated as CE2 but much less costly ...

Before i do that, though, i'm going to see what scripts or parts of scripts i can turn into functions, there are a few opportunities there, like the script that sees who has died and other such simply and quickly-executing tasks.

I'm really pissed off, i was going to post a simple mission this afternoon coz i'm quite pleased with what i've done ...

I must admit i've written the code 'fully expanded', ie; i use 'if ... then' instead of '? :' and suchlike, which must slow it as it's all interpreted ... gee i dunno !

Bollocks :(

LAGUnknownSoldier

  • Guest
Re:Guerilla Warfare
« Reply #13 on: 19 Apr 2003, 00:44:04 »
Stay positive brother ,The game being laggy is a lesser
problem than the colors and graphics . Actually , there are
a lot of problems with it , lol . Just tell me one thing . How much Ram do I need to make it run faster . :) .
But seriously , when technology gets more advanced it
raises the question about alien intervention . But tell me ,
would it be possible to make it so we take more hits to go down ? That would be the best script ever . L8r .

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Guerilla Warfare
« Reply #14 on: 19 Apr 2003, 14:36:34 »
k lag probs dere r som things dat cuse lag  :-X

1) number of AI dat da comp have 2 do
2) Trigers - lot of trigs wil lag more dan lot of scriptin  (depends on da delay dere)
3) loops in scripts - if u have fast loops - change it if u dont realy need em fast
4) da lag wil reaise while dere is fightin ;D

u can alwayz solve lag isues by makin da player use low graphic options

1) setviewdistance 500 command - wil set da max distance da player can c - makin da comp draw less objects
2) setterraingrid 50 (chek da syntax ;D) - wil make da comp run on da lowest graphic option - make it lot easier 4 da comp ;D
3) benchmark command - use 2 make things dat r not realy needed not apear on weaker comps

:cheers:

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Spinor

  • Members
  • *
  • I'm a llama!
    • The chain of command
Re:Guerilla Warfare
« Reply #15 on: 19 Apr 2003, 17:57:46 »
Quote
What i don't understand is that it runs fine at first, but gets slower and slower as time goes on, i thought it would be fine as units die there is less demand on CPU but no
This sounds like some bug in the scripting. Once, I had something similar and it turned out that a repetitively called script did not properly terminate and as time went on, more and more instances were running.
BTW, how many groups/units do you have onmap? Like OFP itself, CE2 scales with the number of groups. If you like, you can also reduce the CE2 workload a bit. Take a look at "globalloop.sqs", which is actually the only looping script in the CE2 and from which all the other stuff is called. In the loop, there are waiting commands:
Code: [Select]
~1To reduce the frequency, make the waiting times larger, say, 1.5 or 2 seconds. After that, the CE2 is maybe a little less responsive (e.g. when issuing a movement command it may take a little longer until they start moving), but should work fine.

Quote
I must admit i've written the code 'fully expanded', ie; i use 'if ... then' instead of '? :' and suchlike, which must slow it as it's all interpreted ... gee i dunno !
This should not make much of a difference, I wouldnÂ't worry about that.

LAGUnknownSoldier

  • Guest
Re:Guerilla Warfare
« Reply #16 on: 20 Apr 2003, 05:04:17 »
tell me a simple script so that the soldiers can get hit and not die . or make it so that the soldiers have to be hit ten times (body armor?)

Kinnon

  • Guest
Re:Guerilla Warfare
« Reply #17 on: 21 Apr 2003, 16:25:15 »
This isn't the right thread for that, but LustyPooh or someone did one, if you search the OFPEC archives i'm sure you'll find one.