Programming Question Help on starting programming in orbiter

Orbi

New member
Joined
Mar 18, 2018
Messages
20
Reaction score
0
Points
1
I want to program my own MFDs and other things and I have basic knowledge of C like upto 2D arrays and pointers. So how should I proceed to work on my own MFDs and do I have to read some physics book or have a
concept on space science along with it. Please explain this to me as I am really eager to work on this.
Sorry for such a long question and thank you for all your help.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
  1. You've already made the most important step: curiosity!
  2. It might be helpful if you extend your language knowledge a little from C to C++ (mostly get familiar with concepts like class / object). The more nifty bits (polymorphism, abstract classes, etc.) are not needed for a general approach, but will help to understand some things later on.
  3. Physics is only needed if the MFD has to display / act with something Physics would describe. If you -for example- create a "Black & White Flash"-MFD(tm) :p, you would possibly not need much Physics background.
  4. I would recommend to take a look at the simplest MFD example source code you can find... and then try to understand (not copy!!!) what's going on there.
 

ADSWNJ

Scientist
Addon Developer
Joined
Aug 5, 2011
Messages
1,667
Reaction score
3
Points
38
+1 for kuddel's reply. Good for you Orbi - there's nothing like getting your first MFD to work, even if it's just a simple Hello World (i.e. a classic starting program in any language).

My suggestions would be:

1. Figure out how to install and use Visual Studio Community Edition (free!), to make simple C programs to run a command line app.

2. Learn the basics of C++. You will need this to work with the Orbiter API. Nothing to be scared of here: if you can do basic C, then simple C++ is a small step. (Now: doing C++ intuitively and properly takes a long time and a lot of work, but once you get there, you will see that C++ is the king of languages).

3. Understand what a DLL is, and how it differs from a .EXE. DLL is the type of file you need to create to dynamically link into Orbiter, so your MFD appears on the configuration screen, and your MFD comes to life.

4. Read about the Orbiter programming model (i.e. read the API guide, read through the API reference, have a look at the types of objects and how things plug together).

5. Come back here and ask a ton of questions. Don't just take shortcuts to put code together and ask people to debug it for you. Instead, come here with questions about how Orbiter calls your code, how the init module hooks into Orbiter, how the pre step and post steps differ, how you persist your MFD when your user presses F8 (as this destroys your instance), and then tons more things as you work up the learning tree.

But yeah - a single button on your MFD "HLO" and a nice centrally aligned H e l l o W o r l d !!! and you will feel top of the world!
 

Orbi

New member
Joined
Mar 18, 2018
Messages
20
Reaction score
0
Points
1
I really am grateful for your replies sirs. Thank you. I will try to do my best.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,659
Reaction score
2,379
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
And there are also example projects for MFDs that you can use for learning how others did it.

And of course, there is the forum with lots of questions and problems that others experienced. Like always in life: The smart learns from his mistakes, the wise learns from the mistakes of others.
 
Top