Howto:Start core development: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (copy/paste my forum response here http://flightgear.org/forums/viewtopic.php?f=18&t=14870#p146436)
 
mNo edit summary
Line 20: Line 20:
For JSBSim, please see: http://jsbsim.sourceforge.net/
For JSBSim, please see: http://jsbsim.sourceforge.net/


There's a wealth of documentation to get you started available in [url=http://gitorious.org/fg/fgdata/trees/master/Docs]$FG_ROOT/Docs[/url]
There's a wealth of documentation to get you started available in [http://gitorious.org/fg/fgdata/trees/master/Docs $FG_ROOT/Docs]


Even more documentation can be found in our wiki, here: http://wiki.flightgear.org/
Even more documentation can be found in our wiki, here: http://wiki.flightgear.org/

Revision as of 16:12, 2 January 2012

This article is a stub. You can help the wiki by expanding it.
WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.

I have taken my forum response and copied/pasted it here. Everybody is invited to contribute. While we do have a Volunteer page, we don't currently have a page dedicated to people wanting to contribute to the C++ source code, so this is an attempt to get something like this started.

Hi & welcome

Many of the things you mentioned don't necessarily require C++ knowledge, FlightGear has become so flexible and powerful that it is increasingly configurable even without the C++ source code.

This isn't to say that C++ wouldn't be useful though. And if that's where your interests are, you are certainly invited to contribute to the C++ code, too. Gitorious is the entry point here: http://gitorious.org/fg/

You said, you have many ideas - ideas (feature requests actually) and bug reports are ideally reported using the issue tracker here: http://flightgear-bugs.googlecode.com/

Most core development related discussions are handled using the developers mailing list: http://www.flightgear.org/mail.html

There's a fully searchable archive available here: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/

Improving the flight dynamics often doesn't require any C++ changes, FlightGear provides a powerful FDM interface and different FDM engines (namely JSBSim and YaSim), both of which are entirely configurable by using XML files.

For JSBSim, please see: http://jsbsim.sourceforge.net/

There's a wealth of documentation to get you started available in $FG_ROOT/Docs

Even more documentation can be found in our wiki, here: http://wiki.flightgear.org/ The wiki is partioned into different "portals", you'll probably be interested in the developers portal here: http://wiki.flightgear.org/Portal:Developer

FlightGear itself consists of a number of different projects and dependencies (libraries), please refer to gitorious for details.

In many parts, the FlightGear code base is still rather archaic, so you won't find too many occurrences of really advanced C++ concepts, in many places you'll just find simple "C with classes", some STL and inheritance. But complex C++ features (such as advanced templates or meta-programming are not too common actually).

The wiki has plenty of stuff to get you started though: http://wiki.flightgear.org/Resources

The SimGear code base is somewhat less archaic and more modern actually. And if you are interested in contributing to the OpenGL/SceneGraph department, you'll inevitably need to look into OpenSceneGraph (OSG), too.

If you'd just like to get started quickly, there are also certain FG components that are strictly (largely) pure C, the Nasal interpreter is just one example (Nasal is FlightGear's built in scripting language): http://wiki.flightgear.org/Nasal_scripting_language

Once you have found something you are interested in, you can search the archives (mailing list and forums) or the issue tracker to find suitable projects to work on, for example: http://code.google.com/p/flightgear-bugs/issues/list?can=2&q=nasal&colspec=ID+Type+Status+Priority+Summary+Aircraft+Milestone&cells=tiles

For Nasal in particular, we have also a page detailing it's most annoying issues here: http://wiki.flightgear.org/Improving_Nasal

If you are interested in fiddling with Nasal itself, i.e. by adding a handful of new commands to the scripting engine, this is documented here: http://wiki.flightgear.org/Howto:Extending_Nasal

None of this requires any C++ knowledge!

If you are interested in adding new subsystems to FG, you may want to check out this: http://wiki.flightgear.org/Howto:Creating_new_Subsystems

The FlightGear property tree is documented here: http://wiki.flightgear.org/Howto:Working_with_the_Property_Tree_API

Regarding patches, please see: http://wiki.flightgear.org/Submitting_Patches Note that this is somewhat depreciated and these days using gitorious (and filing merge requests) is pretty much encouraged.

FlightGear itself uses the decentralized source code management system "git": http://wiki.flightgear.org/Git

If you know for sure that you'd like to fiddle with the core source code, you'll inevitably need to be able build FG from source, this is also documented in our wiki, a more recent article is to be found here: http://wiki.flightgear.org/Howto:_Build_FlightGear_with_NetBeans_using_CMake

You can find tutorials for different platforms/OS at the end of the article.

[quote]I'm used to developing from scratch, because then I know the source tree. What paths have other people taken, to get to know the FG source, and how can I follow a similar path. Please note, I'm not asking anyone to hold my hand, I do know development, just not so much open source :oops: .[/quote]

Our advice would be: Start small, start simple.

[*] start making tiny modifications to existing stuff (aircraft, scenery, source code) [*] read the documentation (wiki, $FG_ROOT/Docs) [*] if you know you want to contribute to the source code, make sure that you are actually able to build FG from source [*] try to get to grips with how git works [*] register an account at gitorious [*] browse the issue tracker for bug reports/feature requests, help triage problems, maybe provide patches too? [*] subscribe to the developers mailing list, ask for advice/projects there [*] check out the wiki for ideas to get started [*] coordinate your effort with others, i.e. communicate your intentions and ask for advice [*] release early and often [*] don't get frustrated :-)


Regarding your list of ideas: Like I said, many of them won't require any modifications to the C++ source code at all. You could probably get started and implement many of them without touching an IDE or compiler.

That might actually be the easiest route for you to proceed. Your programming knowledge would obviously still be useful. The "Nasal" programming language built into FG is syntactically very close to C and C++ - so you could run your own code inside FG without having to build FG from source.

If you are looking for immediate results, Nasal is probably the most promising route - simply because you don't need to look into all the tedious, non-coding related issues.

The tutorial system built into FG is entirely implemented in scripting space, and fully XML-configurable: http://wiki.flightgear.org/Tutorials

This means that you can create/modify and improve tutorials just by editing plain text files.

There are many more things possible using Nasal, just see the wiki. And if you find something not being possible in scripting space, you could either fire up your IDE and extend the interpreter or ask another contributor to provide a corresponding patch.

For non coding-related ideas on how to to start contributing, there's a dedicated article here: http://wiki.flightgear.org/Volunteer

Finally, please don't get discouraged if you don't get too much feedback at the moment, many contributors are busy preparing the next release: http://wiki.flightgear.org/Release_plan