Howto:Start core development: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 20: Line 20:
Also, creating new aircraft, cockpits, scenery, instruments, GUI dialogs etc doesn't require any programming knowledge at all.
Also, creating new aircraft, cockpits, scenery, instruments, GUI dialogs etc doesn't require any programming knowledge at all.


If you are definitely interested in coding, but not in building FlightGear from source, you may want to look into [[Nasal]] programming, which is FlightGear's built in scripting language.
If you are definitely interested in coding, but not in building FlightGear from source, you may want to look into [[Nasal]] programming instead, which is FlightGear's built in scripting language, and doesn't require anything besides FlightGear itself.
 
Many new ideas or features won't require any modifications to the C++ source code at all.
You could probably get started and implement many ideas without even touching an IDE or a compiler for quite a while.
 
That might actually be the easiest route for you to proceed in the beginning. 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, no need for compilers or an IDE. FlightGear IS the run time environment for Nasal code.
 
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.
 
For example, 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.
 
= Hacking the C++ code =


This article will provide the required pointers to get you started hacking the FlightGear source code. Ideally, you already know C++, or a language very close to it, like C or Java.  
This article will provide the required pointers to get you started hacking the FlightGear source code. Ideally, you already know C++, or a language very close to it, like C or Java.  
Line 121: Line 140:
== The property tree ==
== The property tree ==
The FlightGear property tree is documented here: http://wiki.flightgear.org/Howto:Working_with_the_Property_Tree_API
The FlightGear property tree is documented here: http://wiki.flightgear.org/Howto:Working_with_the_Property_Tree_API
== Do you need to know C++ ? ==
Well, many new ideas or features won't require any modifications to the C++ source code at all.
You could probably get started and implement many ideas without even touching an IDE or a compiler.
That might actually be the easiest route for you to proceed. 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, no need for compilers or IDE. FlightGear IS the run time environment for Nasal code.
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.


= Finally =
= Finally =

Navigation menu