Forums » Air Combat & Civil Aviation » Rise of Flight - The First Great Air War » Random Encounter Spawner


Page 1 of 2 1 2 >
Topic Options
Rate This Topic
Hop to:
#2834950 - 08/04/09 09:03 PM Random Encounter Spawner
Gustang Offline
Member

Registered: 01/24/01
Posts: 724
Loc: Ramsey, MN
Just wanted to share that I successfully tested a random encounter spawner that "rolls a dice" to see if the encounter happens. This example is a 50/50 chance of the encounter with a timer that resets the zone trigger (should the player return later, the roll can happen again if you so choose).

Enjoy!

Here's a diagram of it



or link:

http://i622.photobucket.com/albums/tt305/Gustang/basic_random_spawn_diagram.jpg

Edit: Just wanted to mention that the only reason the 3.5 second timer is in there is to fire the report that the roll failed. Otherwise, it's unnecessary.


Edited by Gustang (08/04/09 09:11 PM)

Top
#2834968 - 08/04/09 09:47 PM Re: Random Encounter Spawner [Re: Gustang]
DD_JoeBob Offline
Member

Registered: 06/26/09
Posts: 212
Loc: Salt Lake City, Utah
Now THAT'S a good thing ... just what's needed for a real patrol mission.

Well done.

WH_JoeBob
_________________________
I'm a Chickenhawk and you're my victim, ya gonna come along quiet or do I gotta muss ya up?

Top
#2834985 - 08/04/09 10:57 PM Re: Random Encounter Spawner [Re: DD_JoeBob]
Gustang Offline
Member

Registered: 01/24/01
Posts: 724
Loc: Ramsey, MN
Here's another example of a 4-way choice of encounter. Still testing this one...
It works, but it's not apparent to me that it works correctly. Separating the timers by milliseconds produced a lot of roll failures, where 1 second separation did produce better results (on my computer). This has the timers separated by 3 seconds.

http://i622.photobucket.com/albums/tt305/Gustang/Basic_25_Percent_random_spawn_diagr.jpg


Top
#2835013 - 08/05/09 12:38 AM Re: Random Encounter Spawner [Re: Gustang]
Vanderstok Offline
Member

Registered: 11/20/06
Posts: 534
Loc: Netherlands
Nice! A lot of possibilities with these random timers...

I think we need to be cautious with using msec timers for this kind of stuff, like you said. For my random recon patrol mission I used 200, 400, 600, 800, 1000 msec timers and that seems to work just fine. But who knows, this could work out not so well on another PC?

Specially for single player/campaign missions I think we need to work with at least "seconds" timers. When I was testing my mission in single player mode I used time acceleration to quickly see the results. But the acceleration completely messed up the randomness! I either got the no1 or no5 timer!
Luckily, in co-op missions you can't accelerate time and the server usually has (or it wouldn't be a server) enough processing power to do this correctly.

Top
#2835014 - 08/05/09 12:40 AM Re: Random Encounter Spawner [Re: Vanderstok]
Double_Tap Offline
Member

Registered: 12/26/00
Posts: 880
Loc: Sunshine Coast, Australia
Watching this with great interest!
_________________________
Asus P6T, i7 920 2.66Ghz, 8G GeIL DDR3, nVidia 295 GTX.
Simped F16+ pedals
Cougar Hotas #08970 U2 #20
Thrustmaster Warthog
TrackIr 4 Pro
Windows 7 64 bit
nVidia Drivers 196.21

Top
#2835092 - 08/05/09 04:25 AM Re: Random Encounter Spawner [Re: Double_Tap]
Ming_EAF19 Offline
Babelfish Immune
Veteran

Registered: 09/22/04
Posts: 10617
Loc: London
Thanks Gustang good stuff, naming a mission-building notes folder in your honour and backing up the thread

Ming
_________________________
'You are either a hater or you are not' Roman Halter

Top
#2835102 - 08/05/09 05:03 AM Re: Random Encounter Spawner [Re: Ming_EAF19]
Laser Offline
Member

Registered: 01/09/07
Posts: 781

Thanks! smile

Also when 'there is time' enough, perhaps the 'divide et impera' method can be used in a cascade fashion, using just a similar structure of '2 self-canceling timers' at a time

Top
#2835110 - 08/05/09 05:19 AM Re: Random Encounter Spawner [Re: Laser]
FlyRetired Offline
Senior Member

Registered: 04/17/06
Posts: 3380
Very cool Gustang.

Looks like you guys are developing some real potential with the ME.

Top
#2835146 - 08/05/09 06:13 AM Re: Random Encounter Spawner [Re: FlyRetired]
Gustang Offline
Member

Registered: 01/24/01
Posts: 724
Loc: Ramsey, MN
Well, a couple of things to hash out here. I tested the 3-second separation approach last night and it didn't produce any better results. I got a lot of Fokkers or fails, so it's not bullet proof. Perhaps what we need to try next is to change the steps. Currently, it's:

Timer 1: 25 percent
Timer 2: 25 percent
Timer 3: 25 percent
Timer 4: 100 percent

But perhaps it could be:

Timer 1: 50 percent
Timer 2: 50 percent
Timer 3: 50 percent
Timer 4:100 percent

or increasing:

Timer 1: 25 percent
Timer 2: 50 percent
Timer 3: 75 percent
Timer 4:100 percent

I'm not well versed on statistics (rather probability), so I'm looking for the best way to produce (as close as possible to) an equal chance (like a 4-sided dice) for each step to occur. Any ideas?

I like Laser's suggestion of cascading pairs at 50 percent too. Is that a better approach?

Edit: It's clear now that the 25 percent/timer stepping isn't what I intended. Even at 50 percent/timer stepping, at 2 rolls, the probability of an encounter is already at 25%. Although that doesn't necessarily mean that 25 percent stepping isn't useful.


Edited by Gustang (08/05/09 07:21 AM)

Top
#2835159 - 08/05/09 06:53 AM Re: Random Encounter Spawner [Re: Gustang]
Master Online   sigh
meh
Hotshot

Registered: 07/12/04
Posts: 5613
Loc: NW Alabama, USA
Gustang, is it possible to combine this with your Russian Roulette for Two mission so that the enemies spawned are randomly generated?
_________________________
***sigh***
http://agw.bombs-away.net

Top
Page 1 of 2 1 2 >
Topic Options
Rate This Topic
Hop to:


Forum Use Agreement | Privacy Statement | SimHQ Staff
Copyright 1997-2011, SimHQ Inc. All Rights Reserved.