Hiho,
now I will talk a little about the approach I took toward the realising of approach Number 2, when I tried.
Abstract:
I will outline what I have tried, and with what and why I ended up in my last try (I'm not sure but I think the files were destroyed at some point). I will also talk a little about technical problems I did have at that time.
Overview:
To fill up a whole Island with live we would need to "lift" the OFP limit on units and more Importantly on Groups. This is possible under the assumption of a group that stays together. A system that can also lift this assumption will also be outlined at the end.
The basic idea is to remove units that the group/player cannot possible interact or see. This means he cannot shoot or see. At this point viewdistances in OFP are important to match to values of the system/engine that will be build around the idea.
I had two approaches to the problem. The first survived all but the last try:
Divide the map of OFP into small segments. Usually Squares (is easier). If the player/group is in one of the 8 surrounding segments this particular segments needs to be active, that is everything in it needs to exist. If not, everything in it should be removed.
Of course a logic was build around it to check if the player has changed the segment he was in, then do all the checks.
The problem with this is, that to do it consistently there is no other way than
to put the patter of segments over the whole map. Which means that towns sometimes lie at the boundary of 2 segments. The result was that the player changed often from one segment to another, but a segment change had the effect of a second or five from lag....
I later realised that most of the island is empty space, and are most segments. That gave rise to the idea (a bit similar to approach 2) to put secgments around a city/town, and other important sites (such as some huts), with proper radii, and the possibility of having more than one active.
You then only need to see if one of the units of the group are close enough to the town (no trigger per script...script can do with less lag, you don't need to check often, if you say playes or choppers are not possible)...
So far the easy part. Now to the difficult par in OFP: all this means we/you need to be able to create groups/units "out of thin air". The problem with OFP is not that you cannot create a unit, but that you cannot create a new group. In all 64 Groups are possible per side IIRC. That means you need some logic managing groups. The good news is that once you created a group you can grab the identifier, and it will persist even after everybody in the group died/was deleted. (i.e. group_1 = Group Leader bad_guy_1 will mean you can always join people in group_1...). But in the end you will need a logic to decide which group is not in use, and then use the group and release it if not needed anymore. This will be the more difficult part. If OFP had an Object Oriented Scripting Engine this would be easy, but so harder to do, but possible. The last try on that did die because of lack of attention. I never had the feeling anybody was interested in it...and you know you need alot of ideas for the Quests (see above).
And in the end you need to be able to delete all units in a segment/sector that nobody can interact/see. Here OFP throws a few problems that in the early versions of OFP didn't exist: OFP deleted dead units out of the group.
That means you need an array of each and every object that you created in a segment, to be able to delete it. How to treat vehicles with that? I don't know but it would require some additional logic. I for my part always said that's not that important because JA2 had traditionally little to no vehicles in it. But in the end you could check if a player is in the vehicle or if the vehicle is still in the segment, and delete accordingly.
What you realise is, that with this design, it's not possible for units not belonging to the player group to cross from one segment to another, but again this is not really a problem. Most units would stay in or near a town. Only if the AI flees this is one, but in most cases nobody would see them anyhow.
In the end it's not all that difficult, but alot of work to fill the world and get the Quests in it...
For any questions and/or design help (i did spend quite alot of hours thinking about that) feel free to contact me.
Email adresses are:
jochen.baaz(at-sign-here)epfl.ch
or
jbaaz(at-sign-here)gmx.net
I'd love to see something like that realised, even if my current notebook is a bit week to play it.
-Fishion