Home   Help Search Login Register  

Author Topic: Hellden and Tides  (Read 1736 times)

0 Members and 1 Guest are viewing this topic.

Leone

  • Guest
Hellden and Tides
« on: 07 Oct 2002, 00:48:46 »
I'm sure some of you have probably downloaded the map Hellden that has recently been released. It looks great so far, lots of attention to detail, very well lined up roads, etc, etc. All seems fine....except for one thing. The tides! :tomato:

My friend ChupChup did some investigating, and at certain times the tide goes up high enough to cause one of the main towns (and a LARGE section of land) to be underwater! I don't know if this is intentional....but I kinda doubt it.

So after some more investigating it seems that the highest tide is 5m (or closer to 4.8...but who's counting) above sea level....or Y=5m in WRPEdit. This town in Hellden is set at 3.2m. So for those of you out there who have important features of your maps below 5m.....get 'em up ;)

A more complete list of time and tides is currently been made by ChupChup....but it shall be no more than a guide to dates/tides/sunsets/sunrise....it won't be for every time, day and month. But I'm sure some clever script monkey out there could make a calculator (as OPF works using +hours from 0:00 Jan 1st) :)

lanchong

  • Guest
Re:Hellden and Tides
« Reply #1 on: 07 Oct 2002, 19:08:42 »
Interesting ! Many islands are concerned in fact.
I thought that the tide was not more than 1m.

Could please tell when are the highest and lowest tide that you have noticed (date & time) ?

thanks

Lanchong

Nasty Buttler

  • Guest
Re:Hellden and Tides
« Reply #2 on: 08 Oct 2002, 06:18:40 »
what the.....is it flood season or something....tide of 5m, holy crap....

ofp..hahha

  • Guest
Re:Hellden and Tides
« Reply #3 on: 08 Oct 2002, 06:27:53 »
Damn i just bought that new house now shes gone down ARGHH MATEY.

Anyways i never knew it was 5 m weird whats the date and time i will destroy the world!!

Leone

  • Guest
Re:Hellden and Tides
« Reply #4 on: 08 Oct 2002, 08:27:29 »
The tides in OFP seem to work like real tides.The highest ones occur when there is a fullmoon (these are called surge tides). Essential OFP seems to render these in a sine wave...that is to say the highest point last for about 2.5 hours, the lowest point for about the same, with fast transitions in between.

As for which dates/times produce highest/lowest tides I will attach a list (it will only be very basic) soon....when it is made. But 5m is a good guide. ChupChup is working on it....and also making a very cool mission for Hellden set at just the right time.

Something else discovered about the tides. They seem to effect the interior collision modelling when high. For example when the town in Hellden is about 1.3m underwater you can walk into buildings, but can't climb up stairs. But you can still climb up ladders! Weird :)

Leone

  • Guest
Re:Hellden and Tides
« Reply #5 on: 08 Oct 2002, 11:03:35 »
Ok....easiest way to preview this effect = 0:00, January 1st! Seems the zero hour has a high surge tide. Low tide on these nights seems to be about 0-1m...roughly water level. Generally the tides are a lot lower...2m ish. But this is a good test date for your map :)

Seldom Seen Slim

  • Guest
Re:Hellden and Tides
« Reply #6 on: 31 Oct 2002, 08:37:42 »
Hi, I got this from http://www.theavonlady.org/theofpfaq/ you people you can understand code might find it useful (I've never done anything more than a little BASIC and JavaScript so I can't understand it).

-----------begin stuff I ripped off--------------

Formulas used in OFP for tide levels and sun and moon positions.
In early October 2002, Ondrej Spanel, BIS' lead programmer, published some snippets of C++ code used in OFP to calculate tide levels and the position of the sun and moon. Here they are, for your reference pleasure:

 

Tides formula:
const float maxTide=5;
Vector3 sunDir = sun->SunDirection();
Vector3 moonDir = sun->MoonDirection();
Vector3 sunTide = sunDir[1]*sunDir;
Vector3 moonTide = moonDir[1]*moonDir;
float tide01 = (sunTide.Y()+moonTide.Y())*0.5;
float tideAbs =maxTide*tide01;

Note: BIS is aware that the tide formula contains an error. The correct formula should be:

float tide=(fabs(sunTide.Y())+fabs(moonTide.Y())*0.5;

BIS did not correct this,  as it would make many older missions unplayable.

 

Sun and moon position formula:
float latitudeCoord = world ? world->GetLatitude() : -40*H_PI/180; Matrix3 moonOrbitAngle(MRotationZ,5*H_PI/180);
Matrix3 earthAxis=Matrix3(MRotationX,23*H_PI/180);
Matrix3 latitude(MRotationX,latitudeCoord); // -40 - Croatia, -90 - north pole

const float initMoonOnOrbitPos=0.5;
const float day=1.0/365;
const float lunarMonth=28*day;

float timeInYear = Glob.clock.GetTimeInYear();
float timeOfDay = Glob.clock.GetTimeOfDay();
float moonOnOrbitPos=initMoonOnOrbitPos+timeInYear*(1.0/lunarMonth);
Matrix3 moonOnOrbit=moonOrbitAngle*Matrix3(MRotationY,moonOnOrbitPos*(H_PI*2));
Matrix3 earthOnOrbit=Matrix3(MRotationY,timeInYear*(H_PI*2));
// note - midnight is on the point furthest from the sun Matrix3 midnightToCurrent=Matrix3(MRotationY,timeOfDay*(H_PI*2));
// calculate sun and moon position relative to current postion Matrix3 cameraToCosmos=earthAxis*midnightToCurrent*earthOnOrbit*latitude;
Matrix3 cosmosToCamera=cameraToCosmos.InverseRotation();
// use rotation of PI/2 to achieve this
Matrix3 normalDirection(MRotationX,-H_PI/2);
Matrix3 convert=normalDirection*cosmosToCamera;
_direction=convert*earthOnOrbit.Direction();
_moonDirection=convert*moonOnOrbit.Direction();

// reverse N-S, W-W
_direction[0]=-_direction[0];
_direction[2]=-_direction[2]; _moonDirection[0]=-_moonDirection[0];
_moonDirection[2]=-_moonDirection[2];

_direction.Normalize();

_sunDirection=_direction;


----------------end stuff I ripped off-------------
 

Leone

  • Guest
Re:Hellden and Tides
« Reply #7 on: 31 Oct 2002, 15:16:50 »
Hehehe...yours truely extracted them from BIS (this was an OFPEC news item a couple of weeks ago)....and I'm still waiting for someone to make a calculator  :( But since I can't program for **** I guess I have no idea what is involved...so can't complain too loudly  :)