PDA

View Full Version : Random environment generator


Hawk66
02-27-07, 01:47 PM
Hi Guys,

I was thinking if it's worthy to create a random environment generator (external tool). Basically it could scan the scenario file (it's just a text file, so it's easy), copy it and alter the environmental settings (probably apart of SSP). Examples are time, month, sea state, wind regions etc.

To make it more realistic it could read the LATLONG coordinates to produce a realistic weather for a specific region (which could be conifgured by a XML file to avoid the effort of creating an UI).

Finally, it could append the mission description by giving some hints about the weather, time etc.

Of course, such a tool makes only sense for scenarios, which are highly replayable and dynamic.

What's your opinion?

GakunGak
02-27-07, 03:40 PM
Very good idea indeed, but other than external tool, I would like this if possible to be implemented in-game menu, but that would probably go against SCS not to modify any file from the executables...:damn:
If I only had a hurricane in the game...:rock:

OneShot
02-27-07, 04:52 PM
Thats a great idea. Btw. I recall that Kage (MaHuJa) mentioned he was working on a similar tool himself - maybe you should try to contact him and see whats his status is.

Cheers
OS

Dr.Sid
02-27-07, 05:09 PM
It does not really have to be part of the game. DW switches to background nicely, so it's even better to have it outside the game. I hate I have to quit DW mission editor to play the mission.

Good idea indeed. I'd like to have something like quick mission, but better. Better selection of opponents, and especially weather and time.

LuftWolf
02-27-07, 10:03 PM
If I only had a hurricane in the game...:rock:

You can have any weather you want. :arrgh!:

Go into any mission file with a text editor, and change the environmental settings to anything you desire. You can edit the wind speed to 10000kts, for example, and maybe go to sea state 8? 10?

Try it yourself, it's quite entertaining! :up:

Cheers,
David

To be
02-27-07, 10:11 PM
It is :D. I just tried a sea state 104 in the FFG, which is happy that DW doesn't model flooding. :arrgh!:

SeaQueen
02-27-07, 11:45 PM
What's your opinion?

I like the idea of being able to add random environmental features to a scenario. I frequently find myself making variations of scenarios where I change time of day, weather, etc. from a baseline where the environment is assumed to be basically benign. Randomness is a nice way of avoiding having to ask myself "do I feel like it's a rainy day today?"

Janus
02-28-07, 01:39 AM
Somebody whose name I cannot recall has made a similar thing for SHIII, an external .NET stuff tool which reads and writes the campaign file. It is totally feasable, you just have to start ;)

What I believe would be great if not only the weather would be changed but also use the tool to spawn neturla shipping in the area of operations.

SeaQueen
02-28-07, 08:19 AM
What I believe would be great if not only the weather would be changed but also use the tool to spawn neturla shipping in the area of operations.

That can already be done using the scenario editor. You just have to take the time to put it in.

Dr.Sid
02-28-07, 09:53 AM
What I believe would be great if not only the weather would be changed but also use the tool to spawn neturla shipping in the area of operations.
That can already be done using the scenario editor. You just have to take the time to put it in.

You just can't play missions you create by yourself .. whole fun of subs is 'you don't know'. Sure you can use random boxes but that can generate stupid missions time to time.

Janus
02-28-07, 10:44 AM
You just can't play missions you create by yourself .. whole fun of subs is 'you don't know'. Sure you can use random boxes but that can generate stupid missions time to time. Of course a mission generated by a tool is very unlikely to be as tense and have a good storyline like a carefully built manual mission.
The first post was about an existing scenario which should be scanned and the weather, time and sea state altered randomly - at least tha's how I have understood it.

I don't know much about the mission editor and how scenario files are structured but I could not think of a problem why it should not be possible to add some neutral shipping and so on to a scenario with a tool. If you have a halfway comfortable user interface where you can enter more or less detailed parameters (like: I have this mission near the coast so add me 2 - 4 neutral ships of the class freighter, sailboat or fish trawler which transit along the AO and for a scenario with no coast you can select not to generate ships that would stay near the shore...)

Dr.Sid
02-28-07, 11:19 AM
And bio contacts ! Gee there is too little of them ;)

Hawk66
02-28-07, 02:00 PM
I've thought about myself to create an enhanced quick mission generator some months ago, but I've skipped the idea due to lack of time.

I think it's possible but very, very time intensive to create such a generator which creates interesting scenarions and not only the usual 'Hunt that submarine etc.' stuff. You would need an API/SDK for DW (BTW, it would be sooo good :D to have one, look at Civilization 4) to do automatic tests/background 'playing' so a learning algorithm (AI) could adapt the mission generating. Manual adjusting would be very time intensive. Perhaps a combination of a predefined dynamic mission with some random altering by using an external tool would be the best ?


Ok, I see some interest in such a tool (environment generator) and I think I'll do it, because I wanna play anyway a little with .NET and it seem's a good and not to big application to start with. But don't expect any results soon - I've a time-intensive job like the majority of you, too ;)

Dr.Sid
02-28-07, 02:10 PM
'Hunt that sub' would be pretty OK for me. But DW quick missions can't do that. It can only 'hunt some sub' .. you can't choose allies, you can't choose opponents, you can't choose conditions. All these would be simple to achieve by mission generation (modification) only.

SeaQueen
02-28-07, 10:23 PM
You just can't play missions you create by yourself .. whole fun of subs is 'you don't know'. Sure you can use random boxes but that can generate stupid missions time to time.

I disagree. Rarely is there a time in ASW where you're REALLY in the dark. Intelligence from various sources gives one at least a rough idea of where there might be a submarine geographically. Additionally, the physics of relative motion imposes other constraints upon submarines. Random boxes and dynamic locations applied smartly are all that's really needed to make a great mission that one can play over and over again. My biggest gripe, though, is that typically people don't make them large enough, or else put them in all the wrong places. Scenario designers want a lot of theatre in their scenarios and I think end up "fixing" the outcome of the game sometimes.

SeaQueen
02-28-07, 10:24 PM
And bio contacts ! Gee there is too little of them ;)

You know... that's one thing I wish I could find data on for when I'm making a scenario, what is the density of whales and shrimp globally, by season?

Bellman
03-01-07, 03:26 AM
:D Guess it all depends on coming 'on season' - whalewise ? Things get messy with shrimps.

Following up you're interest in whale migration theres a whole lot of Google stuff on whale migration but info on densities dont amount to a 'can of beans.' Not surprising in view of the nature of hunters v protectionism!

I'm content with SP larger area missions that are not over scripted and random boxes and dynamic locations can overcome 'prescience'. Particularly for ASW practise I appreciate some of the Fleet MP scenarios which can be modded (where necessary) to provide a SP challenge within an ACCEPTABLE time frame.

SeaQueen
03-01-07, 07:15 AM
:D Guess it all depends on coming 'on season' - whalewise ? Things get messy with shrimps.

Right, whales are migratory, like birds, and if it's not the time of year when they're around, then you might seen none. On the other hand, there might be large number of them out there if it's the right time of year.

Shrimp I really don't know anything about.


Following up you're interest in whale migration theres a whole lot of Google stuff on whale migration but info on densities dont amount to a 'can of beans.' Not surprising in view of the nature of hunters v protectionism!

I'm sure the information we need is sitting in a paper or database at some university somewhere. There's very little new under the sun.

Particularly for ASW practise I appreciate some of the Fleet MP scenarios which can be modded (where necessary) to provide a SP challenge within an ACCEPTABLE time frame.

For my own mental reference, what do you consider an acceptable time frame?

Bellman
03-01-07, 09:37 AM
SQ: :lol: This time thing is an old chestnut you and I have pulled out of the fire previously.

Within the scope of this topic I refer to an alternative to 'Quick Missions' purely for sub practise purposes. IMO practise should, amongst other requirements, simulate 'Exercises' in stress testing procedures, so my preference is for 1-2 hour workouts. SAS Quickies at 'hard' are unrealistic. But 2 hours gently cruising to build the picture does not push procedural technique boundaries also !

ACCEPTABLE time frames for maintaining connectivity in MP seem to be up to 2 hours although several of us here on SubSim have logged a desire for longer runs. As you know in SP Kara can captivate and engage with extended tension for many hours, even days. In general I prefer relatively free-form ASW missions rather than those which are over task orientated where I am expected to perform a series of specific actions. Thats just a personal thing - I resent running on other folks railway lines.

''I dont even agree with myself on everything.'' Rudy Giuliani.

Edit: Back OT - Hawk66 I really like your idea and hope you can bring it forward. :rock:

GakunGak
03-01-07, 11:05 AM
SQ: :lol: This time thing is an old chestnut you and I have pulled out of the fire previously.

Within the scope of this topic I refer to an alternative to 'Quick Missions' purely for sub practise purposes. IMO practise should, amongst other requirements, simulate 'Exercises' in stress testing procedures, so my preference is for 1-2 hour workouts. SAS Quickies at 'hard' are unrealistic. But 2 hours gently cruising to build the picture does not push procedural technique boundaries also !

ACCEPTABLE time frames for maintaining connectivity in MP seem to be up to 2 hours although several of us here on SubSim have logged a desire for longer runs. As you know in SP Kara can captivate and engage with extended tension for many hours, even days. In general I prefer relatively free-form ASW missions rather than those which are over task orientated where I am expected to perform a series of specific actions. Thats just a personal thing - I resent running on other folks railway lines.

''I dont even agree with myself on everything.'' Rudy Giuliani.

Edit: Back OT - Hawk66 I really like your idea and hope you can bring it forward. :rock:
M2!:|\\ :smug:

Janus
03-01-07, 11:16 AM
Edit: Back OT - Hawk66 I really like your idea and hope you can bring it forward. :rock: I am sure he can, nothing that was said in this thread is not feasable.
It is just a matter of time and honestly I would not want to spend any on creating such a tool as it is rather low level programming / designing.

To get this documented: what are the planned features?

GakunGak
03-01-07, 02:36 PM
I would personally like:
1. Seastate change
2. Wind direction & speed
3. Biologics spawn
4. Random traffic generator...
The rest per wish...:|\\ :smug:

suBB
03-01-07, 03:11 PM
Hi Guys,

I was thinking if it's worthy to create a random environment generator (external tool). Basically it could scan the scenario file (it's just a text file, so it's easy), copy it and alter the environmental settings (probably apart of SSP). Examples are time, month, sea state, wind regions etc.

To make it more realistic it could read the LATLONG coordinates to produce a realistic weather for a specific region (which could be conifgured by a XML file to avoid the effort of creating an UI).

Finally, it could append the mission description by giving some hints about the weather, time etc.

Of course, such a tool makes only sense for scenarios, which are highly replayable and dynamic.

What's your opinion?

This has already been done about a year ago by some guy I met in gamespy. He is part of some clan or a virtual navy, and it's not ssn or gnsf either. I asked about public release, then he pretty much blew me off.

I can't remember his name to save my own life.

In fact I tried a final version of his creation and it's pretty robust, especially for what we are doing (myself and co-author) in the mission design department.

Heck.. All we would really need from it is random SS, weather, season, bottom type, etc. Everything else can be handled using dyn group, POI, dyn location, playing field, RSB, map infrastructure, scripting and a solid design to ensure in-game playing time.

What we are working on is dynamic mission objective on the MP level, currently set for up to 4-5 hours. 4-5 hour dives are pretty much nothing new and based on experience over the years, was(subcommand) very common in DM.

But, if you are willing to invest the time and energy in doing so, I'm sure it will be greatly appreciated.

Hawk66
03-01-07, 03:37 PM
Back OT - Hawk66 I really like your idea and hope you can bring it forward. :rock:
I'll do my best :D, just give me time.

Planned features

for version 0.5:
- very basic configuration with a XML config file
- no UI
- Random SeaState
- Random Time/Month and automatic adaption of triggers (but not mission briefing etc.)
- Random Weather
- Random SSP? - I'm unsure about this...does that change giving a fixed location? I've not a degree in physics ;)
- adaption of briefing text (include weather report)

version 0.7:
- basic UI for selecting scenario etc.
- Random Wind/Water region

version 1.0:
- configuration to make weather/sea state more realistic for a specific region. For example in the North Atlantic you have in general a tougher weather than in the Mediterranean. But I won't provide the content (data). That would be the job of the community :D
- ...

GakunGak
03-01-07, 03:52 PM
And who said that the Germans aren't the best mechanics...:rock: :smug:

LuftWolf
03-01-07, 04:10 PM
This has already been done about a year ago by some guy I met in gamespy. He is part of some clan or a virtual navy, and it's not ssn or gnsf either. I asked about public release, then he pretty much blew me off.

Classic.

Cheers,
David

Hawk66
03-03-07, 08:10 AM
- Random SSP? - I'm unsure about this...does that change giving a fixed location? I've not a degree in physics ;)

Can somebody give me feedback about this issue? Thx.

Dr.Sid
03-03-07, 08:18 AM
SSP changes a lot based on location, daytime, weather, year season, and some other hard to predict effects, like pollution, vegetation and so on.
SSP is based on pressure (which is more or less constant), salinity (witch changes a little) and temperature (which changes a lot).
All SSP types simulated in DW can appear on the same place (at different times in day). There are location based deviations, but mostly in depth and strength of the layer. On some extreme location some SSP type may not show at all, but it seems to be quite rare.

I guess random SSP selection is perfectly OK, but you should be also able to choose it manualy.

PS: info mostly based on the book 'Principles of underwater sound' from Urick.

Bill Nichols
03-03-07, 10:51 AM
I am in favor of a random environment generator. Just remember, however, to be careful when changing environments... many of my scenarios are 'tuned' to a specific weather/time of day/season/wind/etc.

Hawk66
03-04-07, 07:01 AM
SSP changes a lot based on location, daytime, weather, year season,
Do you think this can be modeled by an algorithm (approximate)? For example: if the weather is bad + it's night+ season is winter =>SSP of type X has the probability of Y%

The environment shall be random but at least a little consistent. For example it does not make sense, to have 'good' weather and a cloudheight of 500m. I think, you get the idea.

Dr.Sid
03-04-07, 07:48 AM
Hm .. my simplest aproximation would be:

- On deep water (1000ft and more) there are almost always convergence zones (CZ). CZ needs mass of water with deep speed minimum. On polar regions they occur even in less deep water (let's say 200ft), and CZ are shorter (20nm).

- With warm air there is almost always surface duct (SD). Rough sea increases it (more surface water mixing allowing warm water to go deeper).
Bad weather (low temperature, no sun) decreases it. Surface duct is minimum to nonexistent in morning and winter.

- Bottom limited (BL) SSP occurs in shallow water and in cold, non-mixed water. So it could be used on morning or polar regions (especially under ice).

Also almost ever there are combinations .. some surface duct and deep channel forming convergence zones.

Maybe there should be options for 'BL,SD,CZ,Auto,Random' .. where auto will suggest SSP type based on location, daytime and weather (resulting in CZ most of the time anyway).

PS: I'm just a bookworm, no RL experience at all. These are subject to discussion.

LuftWolf
03-04-07, 07:52 AM
Actually, that write up there Dr. Sid, increases the collective knowledge of the DW community here on when to put what SSP where and when by a good margin, at least my personal knowledge anyway.

Is there any way you could write up a short "SSP's and Your Scenario" or "What SSP is Right for your Mission?" kind of thing for the mission designers?

Cheers,
David

Hawk66
03-04-07, 09:01 AM
Hm .. my simplest aproximation would be:.
Thanks for the detailed description. Now I've a basic understanding about that stuff. So for V 0.5 I just keep SSP random and plan to make it configurable in one of the next versions.

XabbaRus
03-04-07, 09:10 AM
This might be slightly OT but why did SCS make an air corridor option for DW but not a similar thing for ships?

kage
03-04-07, 11:31 AM
I began on a similar project, a 'neutrals generator' once.

The idea is that the 'ship name' (which is the reference used in triggers, scripts etc) could be of a special format that told this program just how to process it. The effect will tend to be rather like the 'ship corridor'. Among the options I were planning for was "create X of these, and give POIs so that on average we'll see Y of them" and "start them variably far along the path". As well as randomizing exactly what ship it was, perhaps based on a 'group' like 'fishing' (trawler, fishing boat) and so on, to create a dynamic mission, as opposed to running the tool once for every mission.

On the downside, it would require the mission maker to know the syntax, but that's nothing a reference sheet couldn't fix.

I made it in Standard C++ (as with most things I work on) and I can send the sources as they are to anyone who wants to continue the project. As for gui, I figured the windows explorer method is good enough: Drag the "template" mission onto the program. The template contains the rest of the information.


The thing was far from completed, though. I'll take a look at it and see what pieces are there and what needs work.

SeaQueen
03-05-07, 11:03 PM
I am in favor of a random environment generator. Just remember, however, to be careful when changing environments... many of my scenarios are 'tuned' to a specific weather/time of day/season/wind/etc.

It should definitely always be something optional.