View Full Version : What makes FS function ?
datatrain
12-14-2009, 02:28 PM
I've been spending a lot of time with FS since FS98. It occurred to me, I have no idea how the program actually functions.
Originally I thought it might be a series of look up tables. Then I thought a series of sub programs that manage the scenery, aircraft and other variables.
I have considered it might be a looping Xcel type of spreadsheet program.
Truth is, I'm no closer to understanding it than I was at the beginning. The small size of the FS9.exe file would seem to limit the number of operations it can perform.
I worked as a Process logic controller programmer several years ago and have an idea how it could be laid out but those programs are often huge and are for controlling mechanical devices and processes.
Can anyone enlighten me on this ? How does the FS engine work that drives it all ?
DAve
Artkl
12-14-2009, 02:50 PM
Hi Dave,
There's some good information in Microsoft's SDK (Software Devevopment Kit) documents. I don't remember from where I downloaded them, but Google "FS2004 SDK" (without the quotes), and you'll get a bunch of choices. You might also try Microsoft's Knowledge Base.
Because I don't create airplanes from scratch, but only tamper with cockpit instruments and adding newer autopilots to older aircraft, I downloaded the "Aircraft Container System" document. Very good information about how to alter flight characteristics, etc.
When you find it, download the whole package, and print only the docs you want.
As to what's behind the text-like docs, I don't know. I'm sure there's a real programming language behind the scenes, but my programming days ended with the BASIC that came with my Commodore 64!
By the way, I see that you were a control engineers. I was on the editorial staff of Control Engineering magazine in the 70's, just as the microprocessor was making its appearance. Sure changed PLC technology.
Art
teson1
12-14-2009, 04:11 PM
There are interesting articles at msdn:
http://msdn.microsoft.com/en-us/esp/cc742007.aspx (http://msdn.microsoft.com/en-us/esp/cc742007.aspx)
An introduction on how the aircraft simulation part works:
http://msdn.microsoft.com/en-us/esp/cc789356.aspx
How the terrain representation works:
http://msdn.microsoft.com/en-us/esp/cc789357.aspx
And in the end it's a computer program. So there's definitely lots of code.
Gunter
datatrain
12-14-2009, 05:55 PM
That's what I was looking for. A technical discussion of how FS works. Some very interesting reading there.
Thnx
JSkorna
12-14-2009, 05:59 PM
And did you know that your plane in FS is actually stationary and it is the scenery that scrolls below it?
StringBean
12-14-2009, 06:09 PM
And did you know that your plane in FS is actually stationary and it is the scenery that scrolls below it?
Hmmm.....
What about the tower view?
peace,
the Bean
JSkorna
12-14-2009, 07:27 PM
That I couldn't answer!
napamule2
12-14-2009, 07:51 PM
That the scenery moves under you is probably true, as I have left an aircraft in idle, but with parking brake set, and when I came back 30 mins later it had 'moved'. Whoa?
Right away I assumed that the scenery MIGHT have moved, and not the 'aircraft' (a vehicle, actually). Must do check of co-ordinates before and after to confirm.
So, in what direction does 'our world' move in FS? E to W, or W to E? I will return for my answer later (hehe).
Chuck B
Napamule
JSkorna
12-14-2009, 08:39 PM
Same as in the real world, hence the sun, moon, and stars acting almost as in the real world.
n4gix
12-15-2009, 01:54 AM
Truth is, I'm no closer to understanding it than I was at the beginning. The small size of the FS9.exe file would seem to limit the number of operations it can perform.
FS9/X is written in 90% C++ code, with a tiny bit of the original assembler routines that were originally developed by Bruce Artwick. FSX I understand finally managed to get rid of nearly all of the old "legacy assembler" routines.
Like most C++ applications, it is heavily dependent on auxilliary .dll files (dynamic link libraries) to provide most of its actual functions, along with a bunch of .ini, .xml and .cfg files to provide for dynamic runtime changes to be made. Hence, the rather tiny footprint of the fs9.exe and fsx.exe files. They act as a front-end to load the actual files that do the work... :D
datatrain
12-15-2009, 02:58 PM
Thanks for all the input. I now have a reasonable understanding of what goes on behind the curtain.
I found the write up on aircraft simulation very enlightening. Now it's obvious why all the info is in the aircraft.cfg file.
DAve
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.