Howto:Optimizing FlightGear for mobile devices: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 119: Line 119:
Also, it helps not to use subsystems like instruments and/or the autopilot system, by not loading the via the aircraft-set.xml
Also, it helps not to use subsystems like instruments and/or the autopilot system, by not loading the via the aircraft-set.xml


There are many other subsystems which are started by default and which cannot be currently disabled, so more CPU/RAM resources can be saved by editing [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1043 $FG_SRC/Main/fg_init.cxx] and by making more subsystems optional there, using a property to decide if the subsystem shall be started or not.
So, custom scenery/aircraft packs, with customized textures or rebuilding scenery via TerraGear may help.
 
Some possible candidates include:
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1052 the sounds system]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1081 the performance monitor]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1133 the autopilot/route manager systems]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1178 the ATC system]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1196 the traffic manager]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1225 the replay system]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1230 the voice system]
 
While disabling these systems can be fairly easily accomplished using ifdefs, care must be taken that FlightGear still builds properly and that no other systems are trying to access disabled subsystems, so this will involve repeated edit/build/debugging sessions using gdb.


== OpenGL vs. OpenGL ES ==
== OpenGL vs. OpenGL ES ==
Line 139: Line 128:


== Approach ==
== Approach ==
Preparing FlightGear to be run on mobile platforms will take some heavy customizations, not just at the XML/property tree level, but also the source code level.
Preparing FlightGear to be run on mobile platforms will require some heavy customizations, not just at the XML/property tree level, but also the source code level.


That being said, it would make sense for people to team up with other FlightGear users who are interested in running FlightGear on such devices (mobile phones, netbooks, game consoles), if you manage to cooperate, you could actually make this work, regardless of your target platform - simply because these customizations will be useful for all such efforts.  
That being said, it would make sense for people to team up with other FlightGear users who are interested in running FlightGear on such devices (mobile phones, netbooks, game consoles), if we manage to cooperate, we could actually make this work, regardless of the target platform - simply because these customizations will be useful for all related efforts.  


Because they are first of all about reducing the FlightGear resource footprint (CPU, GPU, RAM, disk space), but also targeting FlightGear for devices which may not have a real screen, or keyboard/mouse support will be necessary. In addition, custom scenery/aircraft packs, with customized textures or rebuilding scenery via TerraGear may help.
First of all, this is about reducing the FlightGear resource footprint (CPU, GPU, RAM, disk space), but also targeting FlightGear for devices which may not have a real screen, or keyboard/mouse support will be necessary.  


Obviously, you will need to be able to build FG from source, probably using a cross compiler.
Obviously, you will need to be able to build FG from source, probably using a cross compiler.
Line 150: Line 139:


Being able to disable subsystems individually will be great for the whole simulator, not just for this effort: [[FlightGear Run Levels]].
Being able to disable subsystems individually will be great for the whole simulator, not just for this effort: [[FlightGear Run Levels]].
There are many other subsystems which are started by default and which cannot be currently disabled, so more CPU/RAM resources can be saved by editing [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1043 $FG_SRC/Main/fg_init.cxx] and by making more subsystems optional there, using a property to decide if the subsystem shall be started or not.
Some possible candidates include:
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1052 the sounds system]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1081 the performance monitor]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1133 the autopilot/route manager systems]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1178 the ATC system]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1196 the traffic manager]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1225 the replay system]
* [https://gitorious.org/fg/flightgear/blobs/next/src/Main/fg_init.cxx#line1230 the voice system]
While disabling these systems can be fairly easily accomplished using ifdefs, care must be taken that FlightGear still builds properly and that no other systems are trying to access disabled subsystems, so this will involve repeated edit/build/debugging sessions using gdb.


== Related ==
== Related ==

Navigation menu