Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: razorjack on September 25, 2007, 02:10:05 pm

Title: Getting started for the FS2 mod
Post by: razorjack on September 25, 2007, 02:10:05 pm
I've introduced my idea to extend the FS2 engine with the capatibility of seamless planetary flights and solar-system travelling in
http://www.hard-light.net/forums/index.php/topic,49754.0.html

As I said I'm going to implement the following stuff:

The thing is that every object in FS2 is instanced with the structure called "object" (in object.h). The problem is now that their coordinates are lying in the global coordinate system. What we need is to place every object into the local coordinate system of a parental segment later.
Currently, FS2 performs calculations with the object's coordinates by accessing position variables directly.
So the next step would be to forbid any direct access to these variables and use an interface instead.
The interface could contain functions like these:
- Delta vector between object1 and object2
- Distance between object1 and object2
- get local position
- set local position
aso.

After that a back-end can be implemented behind this interface in different manner. And it allows us to switch between the current FS2 engine and the extension.

I would like to get some programming help because there are over 2000 accesses all over the source. If we get it working then we have done near the half way to the finish. Any help would be really welcome.

By the way, I renamed the structures "object" to "object_t" today because it's a problem to distinguish between the datatype and the word "object" in the code. (You can get my updates from: www.razorjack.de/code.zip)
Title: Re: Getting started for the FS2 mod
Post by: karajorma on September 25, 2007, 02:14:51 pm
Okay, one problem I see is that current missions make heavy use of that global coordinate system. For instance in the get and set position SEXPs. How would the new system deal with those sort of operations?

Another problem is that you're probably going to have to make quite a few changes in the way multiplayer swaps location data around.
Title: Re: Getting started for the FS2 mod
Post by: razorjack on September 25, 2007, 02:35:19 pm
A position in a local space can be described as good as in a global space. In this case, the exact location of an object is a pair with a parental segment and a 3D vector. In SEXP you would need to pass also the target segment as a position parameter. To keep the downwards compatibility with previous mission formats we can translate a singular 3D position vector into a pair format by loading the mission. All we need is to locate the mission itself somewhere in the solar system.

About networks, if I understood you right, a segment can be also addressed exactly in a special index format. This index can be transmitted over the network together with the position vector in a pair.
Title: Re: Getting started for the FS2 mod
Post by: Topgun on September 25, 2007, 04:32:56 pm
shouldn't local vectoring also help for Newtonian?
Title: Re: Getting started for the FS2 mod
Post by: Tempest on September 25, 2007, 10:58:53 pm
A position in a local space can be described as good as in a global space. In this case, the exact location of an object is a pair with a parental segment and a 3D vector. In SEXP you would need to pass also the target segment as a position parameter. To keep the downwards compatibility with previous mission formats we can translate a singular 3D position vector into a pair format by loading the mission. All we need is to locate the mission itself somewhere in the solar system.

About networks, if I understood you right, a segment can be also addressed exactly in a special index format. This index can be transmitted over the network together with the position vector in a pair.

I don't know what you just said, but it sounds like you know what you're doing. My take on the situation is that a lot of enhancements to the code will take a re-organization of the lower level code, and it looks like you've got the ability to do exactly that. I think I speak on behalf of many when I say that I'm exited to see what new things you bring to the already talented SCP program.
Title: Re: Getting started for the FS2 mod
Post by: razorjack on September 26, 2007, 07:00:43 am
Thanks :) I want also to join the team to get involved into the work.

shouldn't local vectoring also help for Newtonian?

It doesn't matter. FS2 has the problem that AI routines and physics routines are coupled together in some ways (as I know from original FS2 source).
Changing the physics routines forces to update the AI routines.
Title: Re: Getting started for the FS2 mod
Post by: Inquisitor on September 26, 2007, 09:29:17 am
Getting help will be challenging, we are resource constrained as it is, and are trying to clean up the existing codebase, so all our folks are fixing things rather than implmenting huge new features.

You may have to soldier on a bit without us.

It looks pretty cool though.
Title: Re: Getting started for the FS2 mod
Post by: razorjack on October 21, 2007, 06:33:20 am
*Bump*

Come on, guys.  I still need programmers.
It mustn't be only Inquisitor or anyone other from FS2SCP team.
Title: Re: Getting started for the FS2 mod
Post by: jr2 on October 21, 2007, 06:56:13 am
Not sure if it'd help, but you could try asking on our sister site, Game Warden  www.game-warden.com
Title: Re: Getting started for the FS2 mod
Post by: razorjack on October 21, 2007, 04:06:45 pm
Can't access to this site. The page is blank.
Title: Re: Getting started for the FS2 mod
Post by: Inquisitor on October 21, 2007, 04:08:03 pm
http://www.game-warden.com/forum/
Title: Re: Getting started for the FS2 mod
Post by: jr2 on October 21, 2007, 11:16:52 pm
Sorry... my bad.  I should have double-checked the link to be sure it worked.  :sigh:
Title: Re: Getting started for the FS2 mod
Post by: Snail on October 22, 2007, 05:03:40 pm
The link does work. MatthewPapa just got lazy. :P
Title: Re: Getting started for the FS2 mod
Post by: jr2 on October 22, 2007, 07:56:29 pm
Well, why not just put a redirect to /forums?
Title: Re: Getting started for the FS2 mod
Post by: Inquisitor on October 23, 2007, 04:48:27 pm
That would be the sensible thing to do :)
Title: Re: Getting started for the FS2 mod
Post by: redsniper on October 26, 2007, 11:28:07 am
but, isn't GW just made up of the same people as HLP?
Title: Re: Getting started for the FS2 mod
Post by: karajorma on October 26, 2007, 01:17:35 pm
When it comes to official coders, pretty much. On the other hand if you say that BtRL and Starfox might be interested you could draw in a few coders who were sorta tempted to join up.