Sign in to follow this  
Dragonmount

If I write an app for FSX, what language does it need to be in?

Recommended Posts

Or does that part matter? I'm curious. I'm learning to program at the moment, and one day when I have more experience I might want to try my hand at an addon.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

If your intent is to construct an addon, you should learn C. You can, however, also use managed code (e.g. C#, VB, etc); however, you'll have to use simconnect and/or FSUIPC to interact with FSX/P3D, which means your addon will operate 'outside' the FSX environment. There are several examples of both in the SDK folder.  Regardless of what code you decide to use, you're going to need an IDE.  I suggest Visual Basics....Good Luck and let me know if I can help you on your journey.   

Share this post


Link to post
Share on other sites

To write a programmatic addon that is supposed to interact with another piece of software, the target has to have an API. FSX has the SimConnect API built in, or you can use the 3rd party FSUIPC API.

 

What language you have to use is dictated by the API, it does not offer libraries for every computer dialect out there. SimConnect libraries are available (in the SDK) for C++, C# and VB. VB is the least well documented, C++ the most extensively covered (for FSX, in P3D bias is changing towards C#)

 

Go to your SDK folder and have a look at the SDK documentation. There are two relevant chapters, one is how to develop a gauge with C++, the other is the SimConnect API reference documentation itself. The latter has many code examples in C++ and C#, and a handful in VB. In the newer incarnation as P3D the C# part has been greatly expanded, so this is probably the most futureproof way to go. But to my best knowledge, programmatic gauges still have to be done in C++. So be prepared to learn both ways, C# and C++

Share this post


Link to post
Share on other sites

I would think grab Visual Studio and go to work on C/C++.  If nothing else it gives you multi-platform utility outside of FSX/P3D.  Don't really know anything about C# but I guess that's an MS thing so your learning kind of locks you into Windows. 

 

scott s.

.

Share this post


Link to post
Share on other sites

C# is the language I am learning, I know a good deal of C++ as well, I have no idea what form the addon will take, though likely it will be a utility of some sort, it all depends on how far I can wind up taking the languages, thanks for the replies.

Share this post


Link to post
Share on other sites

C# is the language I am learning, I know a good deal of C++ as well, I have no idea what form the addon will take, though likely it will be a utility of some sort, it all depends on how far I can wind up taking the languages, thanks for the replies.

 

Assembler always works.

 

blaustern

Share this post


Link to post
Share on other sites

ASM is like making bricks with sand, C++ is like making houses with bricks, and Embarcadero Delphi is like making conurbations with houses. C# is a good alternative to C++ on Windows. Origins of C# written in Delphi by Anders Hejlberg.

  • Upvote 2

Share this post


Link to post
Share on other sites

C# is the language I am learning, I know a good deal of C++ as well, I have no idea what form the addon will take, though likely it will be a utility of some sort, it all depends on how far I can wind up taking the languages, thanks for the replies.

C# is a good start into the FS addons - depending on what you want to do of course. The examples in the SDK are pretty straight forward. If you don't plan to dive into SimConnect, but instead to write a tool to manipulate the myriad of config files of the sim towards a specific end, then it wouldn't matter at all. Any dialect can do that.

 

As a general rule, you always use the tech that is best suited for the job. If you develop addons for a platform hat offers a C# API, you use C#. Want to make a programmatic gauge for FSX? Use C++. A standard XML gauge? Learn their funny XML based dialect in reverse polish notation. If you develop an enterprise web application you use JavaEE. If you need to write Python scripts for an app like GSX, you just do it. Learn to look behind the languages and get a feeling for how they (all) work, so you can always find the best suited tech that gives you max results with the least effort.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this