Merge branch 'master' of https://github.com/okamstudio/godot.wiki

Juan Linietsky 2014-04-18 11:35:25 -03:00
commit 861525a25f

@ -2,7 +2,11 @@
### Base Resolution
A base screen resolution for the project can be specified in the project settings. However, what it does is not completely obvious. When running on PC, the engine will attempt to set this resolution (or use something smaller if it fails). On mobile, consoles or devices with a fixed resolution or full screen rendering, this resolution will be ignored and the native resolution will be used instead. To compensate for this, Godot offers many ways to control how the screen will resize and stretch to different screen sizes.
A base screen resolution for the project can be specified in the project settings.
<p align="center"><img src="images/screenres.png"></p>
However, what it does is not completely obvious. When running on PC, the engine will attempt to set this resolution (or use something smaller if it fails). On mobile, consoles or devices with a fixed resolution or full screen rendering, this resolution will be ignored and the native resolution will be used instead. To compensate for this, Godot offers many ways to control how the screen will resize and stretch to different screen sizes.
### Resizing
@ -14,7 +18,7 @@ In any case, while changing the root Viewport params is probably the most flexib
Stretch settings are located in the project settings, it's just a bunch of configuration variables that provide several options:
<p align="center"><img src="images/stretch.png"></p>
<p align="center"><img src="images/stretchsettings.png"></p>
#### Stretch Mode
@ -22,6 +26,8 @@ Stretch settings are located in the project settings, it's just a bunch of confi
* **2D**: In this mode, the resolution specified in display/width and display/height in the project settings will be stretched to cover the whole screen. This means that 3D will be unaffected (will just render to higher-res) and 2D will also be rendered at higher-res, just enlarged.
* **Viewport**: Viewport scaling is different, the root [Viewport](class_viewport) is set as a render target, and still renders precisely to the resolution specified in the `display/` section of the project settings. Finally, this viewport is copied and scaled to fit the screen. This mode is useful when working with pixel-precise games, or just for the sake of rendering to a lower resolution for improving performance.
<p align="center"><img src="images/stretch.png"></p>
#### Stretch Aspect
* **Ignore**: Ignore the aspect ratio when stretching the screen. This means that the original resolution will be stretched to fit the new one, even if it's wider or narrower.