• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 What language to use?

Messages
1,588
Country
unitedstates
I could use some input. Years ago I created the FDSFX panel for sound effects controlled from inside the cockpit. A simple 2D panel where the simmer flips a switch and an audio recording would play. Right-clicking on the switch would give options such as auto-repeat, volume control and selecting the file to play.

It had a good run starting in 2003 and working all the way up to P3Dv3. But with P3Dv4 it finally came to its demise. So I am looking at creating the gauge again but for 64b and hopefully adding a few more "bells-n-whistles".

Here's the issue, I did not create the gauge. A simmer friend of mine did and he is long gone. So looks like it is up to me, ha! I have experience in vbscript and have dabbled as late into JavaScript and Python.

From what research I have done here and the SDK I see the two main languages are C++ and XML but I have even heard that C# is being used. I have also read it is best to use the language that will best suit what I am trying to develop.

So my question (finally) is... based on my experience and type of gauge I am trying to replicate what language would you recommend to start learning?

Clutch
 
Another C++ vs XML discussion; always interesting and never ending. No denying that C++ is the gold standard, versatile language of choice for professional developers. If you're just starting out, it has a huge learning curve. It will take a lot of time.

On the other hand, since Doug Dawson has released a 64 bit version of his sound module, it's worth considering XML for this project. For one thing, there are a lot more people in this forum that can offer help with XML than C++. In the XML world, there's debate over which form of XML to use, FS9 schema or FSX schema. Take a read through this recent thread for some of the pros and cons.

Bob
 
There are 4 languages you can use for standard Gauge code in P3Dv4.

C++
XML
XML/LUA Hybrid
Action Script

Each has it's plus's and minus's and requirements, just as you don't actually need Doug's XML gauge to do custom sounds in P3Dv4 (though don't get me wrong I prefer doug's gauge) as LM actually asked a lot of Dev's during development what we wanted out of the sound system and did their best to give us in application development for it so we can now set and trigger custom sounds within the sim using the standard PDK options.

IF you are planning on doing standard .xml gauge stuff I strongly recommend using LUA scripting over the reverse polish notation, it's far more powerful.

IF you know how to use Flash then you can use Scale Form and Actionscript to make your panels.

Best bet is to look at the current SDK and choose what you think works best for your project.. Thing to note the LUA code will as far as I am aware only work with the 'FSX' schema as it looks for <script>!lua as part of the parsing.

Edit in addition to the above if your using Simconnect then in P3DV4 LM expanded the DLL options so that you can use both C++ and C# in compiled in app DLL's though there doesn't appear to be much in the way of examples for the compiled DLL's and of course it's limited at the moment solely to simconnect no access to the gauge side, I continue to request for C# every time they ask me my opinions ;)
 
C++ since it is the native language in which (most of) the Windows operating system is written.
When you are using C++, you will be able to hook into the deepest level of the underlying operating system.
XML and the other stuff will only get you so far...
 
Thx for the input guys. I think I will start reading up on C++. It usually takes me about 6 months to get a basic footing on a language at least that is was it has been like in the past grasping the concepts. I did work with a team (as a non-coder) who were working with a P3D add-on and they were using C# but not sure if that will work with gauges working thru the API?
 
It usually takes me about 6 months to get a basic footing on a language at least that is was it has been like in the past grasping the concepts.
Since I'm facing this same challenge too in the near future for my own YF16 project, I already have collected some C++ resources.
Here are a few links that can be helpful to you too "Clutch Cargo", so you can cut down the "basic footing time"

Philosophy / mindframe document behind the C++ language - Bjarne Stroustrup (inventor of C++)

This slideshow can help you get into the mindframe of the C++ language pretty visually
- http://www.cs.columbia.edu/~aho/cs4115/lectures/14-01-29_Stroustrup.pdf

Microsofts's MSDN - Getting started with C++
- https://msdn.microsoft.com/en-us/library/zdbe067e(v=vs.90).aspx

Free C++ IDE and Compiler overviews:
- http://www.freebyte.com/programming/cpp/
- http://codecall.net/2014/02/26/best-compilers-and-ides-for-cc-programmers/
- https://www.thoughtco.com/c-and-c-plus-programming-4133470
- http://codecondo.com/top-10-ide-for-c-and-cplusplus-for-programmers/

Free MIT Open Courseware Courses regarding C and C++

- https://ocw.mit.edu/courses/electri...096-introduction-to-c-and-c-january-iap-2013/
- https://ocw.mit.edu/courses/electri...tive-programming-in-c-and-c-january-iap-2014/

Free "Learn C++" resources, courses, communities:
- http://www.learncpp.com/
- http://www.cplusplus.com/
- http://www.tutorialspoint.com/cplusplus/
- https://www.freeeducator.com/free-online-course-on-intermediate-c-by-microsoft/#freeonlinecourse <- free intermediate C++ course from microsoft
- http://www.dreamincode.net/forums/forum/48-c-tutorials/
- http://www.tenouk.com/Sitemap.html

Free Downloadable Ebooks on C++ programming (beginner, advanced):
-> "Thinking in C++" by Bruce Eckel

- Volume1 (878 pages!) - http://iacs-courses.seas.harvard.edu/courses/cs207/resources/TIC2Vone.pdf
- Volume2 (512 pages) - http://iacs-courses.seas.harvard.edu/courses/cs207/resources/TIC2Vtwo.pdf

-> "Fundamentals of C++ programming "- Richard L Halterman
(746 pages) - http://python.cs.southern.edu/cppbook/progcpp.pdf

-> "Teach yourself C++ in 21 days" - Sam's
- (722 pages) - http://www.angelfire.com/art2/ebooks/teachyourselfcplusplusin21days.pdf

-> The Windows API (WIN32) tutorial (on C not C++)
- http://slav0nic.org.ua/static/books/C_Cpp/theForger's_Win32APITutorial.pdf


Windows API introduction:
- http://www.dreamincode.net/forums/topic/207581-intro-to-the-windows-api/

Windows API in C++
- http://www.relisoft.com/win32/index.htm
- https://learnwinapi.wordpress.com/
- http://www.winprog.org/tutorial/


How to create a DLL in Visual C++
- https://msdn.microsoft.com/en-us/library/ms235636.aspx
https://msdn.microsoft.com/en-us/library/ms235636.aspx
C++ Code sample websites /communities (to get started):
- https://www.codeproject.com/
- http://www.informit.com/articles/index.aspx?st=60233
- http://www.alternative-computer-programming.com/cplusplus-with-qt-tutorial-index.html C++ with QT (cross platform development)

Independent C++ (real-life) Conference:
- http://meetingcpp.com/

I hope these free resources will get you "C++ airborne" a.s.a.p. :)
 
Last edited:
Back
Top