Howto:Optimizing FlightGear for mobile devices: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 46: Line 46:
Cross-compiling FlightGear for Android devices is not that problematic. However, running FlightGear on an Android device, requires a fair share of customizations, i.e. a downstripped base package, and custom aircraft modifications (key bindings, mouse vs. touch screen support etc). Also, many FlightGear defaults would be unnecessarily high and would not work "as is", these could be reduced (scenery complexity, shaders, rendering settings).  
Cross-compiling FlightGear for Android devices is not that problematic. However, running FlightGear on an Android device, requires a fair share of customizations, i.e. a downstripped base package, and custom aircraft modifications (key bindings, mouse vs. touch screen support etc). Also, many FlightGear defaults would be unnecessarily high and would not work "as is", these could be reduced (scenery complexity, shaders, rendering settings).  


== GUI ==
== Base Package ==
 
=== GUI ===
However, the challenges remain - you could just as well try running FG on a netbook with Intel GMA graphics, while it works, there are certain challenges: my IPhone has about 1/5 of the screen estate that my netbook has ...
However, the challenges remain - you could just as well try running FG on a netbook with Intel GMA graphics, while it works, there are certain challenges: my IPhone has about 1/5 of the screen estate that my netbook has ...


Line 55: Line 55:
Until FlightGear 2.8, the GUI is PUI-based and thus cannot be scaled dynamically. However, the new upcoming [[Canvas Widgets]] based GUI will use a vector-driven approach, so that the GUI can be fully scaled as required.
Until FlightGear 2.8, the GUI is PUI-based and thus cannot be scaled dynamically. However, the new upcoming [[Canvas Widgets]] based GUI will use a vector-driven approach, so that the GUI can be fully scaled as required.


== Scenery ==
=== Scenery ===
It might even be an option to come up with a custom scenery build for Android devices, specifically aimed at low resource usage - i.e. just the KSFO region, and some basic aircraft, which can be easily adapted for non-PC devices, such as the ufo.
It might even be an option to come up with a custom scenery build for Android devices, specifically aimed at low resource usage - i.e. just the KSFO region, and some basic aircraft, which can be easily adapted for non-PC devices, such as the ufo.


Line 66: Line 66:
You could reduce the CPU/GPU load by customizing the scenery tile, using custom resolutions and textures.
You could reduce the CPU/GPU load by customizing the scenery tile, using custom resolutions and textures.


== XML/Property Tree level optimizations ==
=== XML/Property Tree level optimizations ===
Just so that you know: I just finished building and running FG 2.8 on an old (5 years) computer, and the default settings left FG basically unusable (even when using just the ufo), the largest impact had disabling the AI traffic/model system (which was causing severe stutter, which also showed up in the system monitor) and ALL the shader support. Starting FlightGear in a no-scenery location gives me about 350 fps in 800x600, starting at KSFO is well above 60 fps (frame throttling disabled), usually between 50-90 fps and frame spacing between 35-45 ms.
Just so that you know: I just finished building and running FG 2.8 on an old (5 years) computer, and the default settings left FG basically unusable (even when using just the ufo), the largest impact had disabling the AI traffic/model system (which was causing severe stutter, which also showed up in the system monitor) and ALL the shader support. Starting FlightGear in a no-scenery location gives me about 350 fps in 800x600, starting at KSFO is well above 60 fps (frame throttling disabled), usually between 50-90 fps and frame spacing between 35-45 ms.


Line 77: Line 77:
In other words, even if you don't have access to an Android phone, there are certain things that can be done, and which would help (using an Android emulator via VirtualBox would be another option). Just customizing FG for limited targets like netbooks would also help, and if you have an old computer with an nvidia 6x/7x generation card, you could just as well try running FG.
In other words, even if you don't have access to an Android phone, there are certain things that can be done, and which would help (using an Android emulator via VirtualBox would be another option). Just customizing FG for limited targets like netbooks would also help, and if you have an old computer with an nvidia 6x/7x generation card, you could just as well try running FG.


== Minimal Startup Profile ==
=== Minimal Startup Profile ===
Basically, the point of the following settings is to disable EVERYTHING that could have an effect on performance, to ensure that we get a working FlightGear window up and running. Once that is working, features can be re-enabled step by step. Features should only be re-enabled after evaluating their impact on performance, using the frame rate counter, frame spacing indicator, the built-in system monitor (can be inspected via telnet/http) and the OSG on-screen stats.
Basically, the point of the following settings is to disable EVERYTHING that could have an effect on performance, to ensure that we get a working FlightGear window up and running. Once that is working, features can be re-enabled step by step. Features should only be re-enabled after evaluating their impact on performance, using the frame rate counter, frame spacing indicator, the built-in system monitor (can be inspected via telnet/http) and the OSG on-screen stats.


Line 120: Line 120:


So, custom scenery/aircraft packs, with customized textures or rebuilding scenery via TerraGear may help.
So, custom scenery/aircraft packs, with customized textures or rebuilding scenery via TerraGear may help.
=== Disabling Nasal modules ===
Nasal sub modules like [[local weather]] can be "disabled" by removing the sub folders in $FG_ROOT/Nasal.
Individual Nasal modules in $FG_ROOT/Nasal can be disabled by changing the *.nas file extension.


== OpenGL vs. OpenGL ES ==
== OpenGL vs. OpenGL ES ==

Navigation menu