Tools Programming FAQ

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#1
This Sticky will be used over time to provide information on Tools Programming. It is intended to help those who may be new to developing add-on programs for FS. It is in the form of a Q&A FAQ and will be added to over time.

Q. What is the best programming language to develop FS Add-ons?

A. There isn't one. Add-ons can be developed in any language from C thru Delphi to VB.NET and C#. In many cases it will come down to the degree of interaction that is needed with FS and the personal preference of the developer.

In FS9 the main way to do that is through FSUIPC and there are SDK examples of how to interact in most of the common programming languages. In FSX the expectation is that developers will use SimConnect to interact. The SDK for SimConnect provides access via C++ or C#, although the managed library can be accessed from any dotNET language such as VB.NET or Java.
 
Last edited:
#2
I'm new. And I'm disappointed that there's just one post here. So, I'll start the questions, and hopefully I'll get good answers.


1. Should I go with C++, C# or something else, provided that I don't know programming at all.

2. What's a good resource to learn from for creating FSX addons? Will Microsoft's page (https://msdn.microsoft.com/en-us/library/cc526948.aspx#SimObjectCreationKit) suffice?

3. What is FSX ESP? Do I need it? If I do, how can I get it?

4. I want to develop addons that would work for both FSX Acceleration and FSX-SE. Is there anything I should keep in mind?

Thanks
 

Ronald

Resource contributor
#3
1. MS-FS[n] is written in C or C++ so if you want to tap into the raw power of MSFS, start learning its own native programming language first.
This helps you to
- understand how the FSX-stuff works under-the-hood and to know its internal architecture.
- to tap directly into the heart of FSX (instead through FSUIPC.DLL internal limitations).


2. Internet search engines (like Yahoo, Dogpile, Google) is your best friend in this, but here are few link to get you started:
FSX (ESP) - Programming gauges in C++:

- https://msdn.microsoft.com/en-us/library/cc526958.aspx

FSX (ESP) - Creating XML gauges:
- https://msdn.microsoft.com/en-us/library/cc526953.aspx

FSX - Development related websites:
- http://www.flightsim.com/vbfs/forumdisplay.php?24-Panel-amp-Gauge-Design
>>
- http://www.fsdeveloper.com/wiki/index.php?title=Category:panel_and_Gauge_Design
- http://www.fsdeveloper.com/wiki/index.php?title=Category:SimConnect
- http://www.fsdeveloper.com/wiki/index.php?title=Category:Tools
>>
"Welcome to the fs2x Tutorials Page"
- http://www.fs2x.com/Tutorials.htm
>>
"FSX, P3D and CFS3 Gauge Creation Tutorial Rev.35" (download):
- http://library.avsim.net/index.php?CatID=fsxpan&Sort=Name&ScanMode=0&Page=15


3a. "ESP" is a kind of "rebranding name" invented by Microsoft for its "flight-simulation product":
You can read more about it over here:
- https://msdn.microsoft.com/en-us/library/cc526948.aspx
- https://msdn.microsoft.com/en-us/library/aa155304.aspx

3b. You can "get it" by installing it from the DVD's from the "FSX DeLuxe" / "FSX Acceleration" or the "FSX Gold" version:
Read more about it here:
- http://www.fsdeveloper.com/wiki/index.php?title=SDK_Installation_(FSX)


4. I do not have answers for this question, since i'm only(yet) plane designers / builder


I hope my answers get you started in flightsim development.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#4
What kind of addon do you want to make? Not all addons involve programming.
 

Ronald

Resource contributor
#6
Personally I would like to model, to créate gauges, animations and all for the Project but it's a hard task.
- Is it going to be a one-on-one copy of FSI-Panel?
- What kind of other / new functionalities are you going to create?
 
#7
I haven't figured everything out yet, except that I have to learn more C#. As far as programming goes, if there's a level before "beginner" or "newbie" that would be me. The problem is, I can't find all the information I need in one place in order for me to learn what is needed to learn. I've already tried to copy and paste the SDK C# given examples into Visual Studio, but for some reason I get many errors without any changes on my part. These example should work. I spend hours every day just searching for solutions.

As for the features I'd like to add... here are some:
1. Touch 'n' go landing reports (which would keep reports coming without ending the flight and reloading).
2. Random and/or customized weather changes with every landing without ending a flight.
3. Difficulty levels
4. The most important feature in my opinion would be that it would be free.
 
Last edited:

Ronald

Resource contributor
#8
I haven't figured everything out yet, except that I have to learn more C#. As far as programming goes, if there's a level before "beginner" or "newbie" that would be me.
1 - Then I suggest to start at the absolute C# beginners basics, by choosing the right C# compiler first and learn to install it right on your computer:
If you do not learn this to perfection, you shall be running into compiler, linker, builder errors, without you have a clue about:
- What these errors really mean (since you do not know yet how a compiler really works under-the-hood)
- Where to start looking for a solution to solve it (since you are not yet able to decypher what causes the problem in the first place)
Only when you got this part right and fully understood, then move on by installing an integrated C# IDE like the one's below, not sooner!
List of free C# compilers:
- http://www.thefreecountry.com/compilers/csharp.shtml
- https://www.visualstudio.com/vs/visual-studio-express/
- https://eclipse.org/users/

2 - Next start learning to program C# from the Windows\Linux\Apple COMMANDLINE:
Why? This gives you a great change to get to know how a compiler, linker, builder and libraries works , and to encounter LOTS of error messages there. Once you got a grasp of that error-level, you are ready to install an integrated C# IDE like Microsoft Visual Studio or Eclipse with a C# addon:
General C# tutorials
- https://www.tutorialspoint.com/csharp/
- http://csharp.net-tutorials.com/
>
Microsoft related C# materials
- https://msdn.microsoft.com/en-us/library/aa288436(v=vs.71).aspx
- https://msdn.microsoft.com/en-us/library/618ayhy6(v=vs.71).aspx


The problem is, I can't find all the information I need in one place in order for me to learn what is needed to learn.
That is correct, unfortunately it is splattered all over the Internet.

Welcome to the FSdevelopers community, where you can find lots of information you need to get started. Just browse the forum and ask your questions in the right section and wait for the replies from the worlds most experienced FS-add-developers here.


I've already tried to copy and paste the SDK C# given examples into Visual Studio, but for some reason I get many errors without any changes on my part.
That is the very reason why you should FIRST work you way up from the C# basics:
- first learn the C# language by heart,
- get to know your compiler, libraries, linkers, and WHAT causes WHICH errors and know how to solve them first by understanding then fully
- get to know your your IDE (Visual Studio) works and what you must adjust to get the samples working

In short:
There is no quick-and-dirty to easily develop an good Fs-addon by <copy-and-pasting examples>, without:
- fully understanding the underlying C# language basics,
- totally know and control your C# compiler
- mastering your C# IDE first.

These example should work. I spend hours every day just searching for solutions.
Once you fully and truly understand your C# development environment, you can solve the error within hours.
Start at the absolute C# first (and master it) then you will enjoy that time spend there later :)
 
#11
Hey what can a DLL file in FSX / P3D contain ? i know DLL can contain classes / sturucts / vars / fonctions ..... ( at least in C# )
so what can we do with a DLL in fsx ? and what is the diffrence from exe ?
in general development i know the diffrences but in fsx i can see addons that are inside a DLL not an EXE
thnx in advcane :)
 
Top