Howto:Make an aircraft: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
m (: + random splashes)
mNo edit summary
Line 1: Line 1:
{{WIP}}
{{stub}}


There are many things required to develop an [[aircraft]] for [[FlightGear]]. We encourage new aircraft [[Portal:Developer|developers]] to start their 'career' by modifying and enhancing existing aircraft. It is much easier to do and gives you a giant advantage by the time you create an aircraft completely by yourself.   
There are many things required to '''develop an [[aircraft]] for [[FlightGear]]'''. We encourage new aircraft [[Portal:Developer|developers]] to start their 'career' by modifying and enhancing existing aircraft. It is much easier to do and gives you a giant advantage by the time you create an aircraft completely by yourself.   


The content in this article gives a summary of codes and can be found on most planes. So, for examples on how it's used, you can take a look at some random planes.
The content in this article gives a summary of codes and can be found on most planes. So, for examples on how it's used, you can take a look at some random planes.
Line 12: Line 12:
## auditory (sounds).
## auditory (sounds).


All images in FlightGear should be sized to powers of two (eg. 64*64, 128*256 or 16*1024). Since FlightGear 1.9, images no longer have to be saved in the .rgb format. Right now .png is most common used among FlightGear developers.
===Rules and guidelines===
 
* All images in FlightGear should be sized to powers of two (eg. 64*64, 128*256 or 16*1024). Since FlightGear 1.9, images no longer have to be saved in the .rgb format. Right now .png is most common used among FlightGear developers.
Please note that we use spaces in our codes, some developers use rather tabs, to make our code easy(er) to read. Every line that starts a new tag, we press the space key once, so you get a kind of stairs. It does not really matter what method you use, as long as you use it consistently throughout all of your files.
* Please note that we use spaces in our codes, some developers use rather tabs, to make our code easy(er) to read. Every line that starts a new tag, we press the space key once, so you get a kind of stairs. It does not really matter what method you use, as long as you use it consistently throughout all of your files.
* Filenames and directories are case-sensitive on most OS's. Windows is not case-sensitive, so when you are developing on a Windows machine, you won't notice any problems. On other OS's, there is a difference between 'Boeing' and 'boeing'. Since FlightGear is used on multiple platforms, make sure your code makes correct usage of capitals.


==Directories and files==
==Directories and files==
Line 27: Line 28:
* [[YASim]], needed for: helicopters, towing over a [[Howto: Multiplayer|multiplay network]]
* [[YASim]], needed for: helicopters, towing over a [[Howto: Multiplayer|multiplay network]]
* [[JSBSim]], needed for: [[Howto: Implement pushback|pushback]] (external forces)
* [[JSBSim]], needed for: [[Howto: Implement pushback|pushback]] (external forces)
* [[UIUC]] (rarely used)
* [[UIUC]] (rarely used these days)
When you have acces to real windtunnel data, JSBSim might be a better choice.
With limited data available, YASim is generally considered to be the best way to go. When you have acces to real windtunnel data and/or require more flexibility, JSBSim might be a better choice.


===The -set.xml file===
===The -set.xml file===
Line 47: Line 48:


====<description></description>====
====<description></description>====
The text that is to be shown in the Aircraft selection dialog of fgrun.
The text that is to be shown in the aircraft selection dialog of [[FGRun]] and other GUIs.


====<aircraft-version>====
====<aircraft-version>====
Line 77: Line 78:


====<model><path></path></model>====
====<model><path></path></model>====
Where to find the model. Could be an .ac file or .xml if you want to have extras like animations etc.
Where to find the model. Could be an .ac file (plain model format) or .xml if you want to have extras like animations etc.


====<sound><path></path></sound>====
====<sound><path></path></sound>====
The path to your aircrafts sound file, do not include if you don't have one. The pitch and volume of the sound is controlled by the xml file and throttle position. If for example you find a nice wav file of the jet engine you're using, you can fix it up with your favorite sound editor so it loops nicely and include that into your model (I've noticed a few models where it can get quite annoying when the loop length is so small you can really notice it) so make it smooth.
The path to your aircrafts sound file, do not include if you don't have one. The pitch and volume of the sound is controlled by the xml file and throttle position. If for example you find a nice wav file of the jet engine you're using, you can fix it up with your favorite sound editor so it loops nicely and include that into your model (I've noticed a few models where it can get quite annoying when the loop length is so small you can really notice it) so make it smooth.


For additional information, you'll want to check out $FG_ROOT/Docs/README.xmlsound
For additional information, you'll want to check out <tt>[[$FG_ROOT]]/Docs/README.xmlsound</tt>


====<panel><path></path></panel>====
====<panel><path></path></panel>====
Line 91: Line 92:


===Engines/ directory===
===Engines/ directory===
Only required for JSBSim aircraft. In this directory the engine files are stored.
Only required for JSBSim aircraft. In this directory the engine and thruster/propeller files are stored.


===Models/ directory===
===Models/ directory===
Line 141: Line 142:


===Sounds/ directory===
===Sounds/ directory===
What is an airliner without the sound of its mighty engines, or a glider without the sound of wind blowing around your face? Sounds quite important to increase the feeling that you are actually into the simulation. In this directory all sound files that are specific for the aircarft are stored. Sounds that can be used on multiple aircraft (eg. the click of a switch or thunder) are available in the <tt>[[$FG_ROOT]]/Sounds</tt> directory.  
What is an airliner without the sound of its mighty engines, or a glider without the sound of wind blowing around your face? Sounds are quite important to increase the feeling that you are actually into the simulation. In this directory all sound files that are specific for the aircarft are stored. Sounds that can be used on multiple aircraft (eg. the click of a switch or thunder) are available in the <tt>[[$FG_ROOT]]/Sounds</tt> directory.  


===Tutorials/ directory===
===Tutorials/ directory===

Navigation menu