- Mastering UI Development with Unity
- Ashley Godbold
- 325字
- 2021-08-27 18:43:08
Resolution and aspect ratio
The resolution of a game is the pixel dimension of the screen. For example, a game could run at 1024x768. This means that the game is 1024 pixels wide and 768 pixels tall. The aspect ratio of a game is the ratio between the width and height (expressed width:height). This aspect ratio of a game is determined by dividing the resolution width by resolution height and then simplifying the fraction. So, for example, if your game has a resolution of 1024x768, the aspect ratio would be as follows:

Here, the fraction 4/3 is the aspect ratio 4:3.
The following diagram provides a list of common aspect ratios and related resolutions:

The following website provides a list of common resolutions specific to iOS devices: http://iosres.com/. Note that not all the aspect ratios are simplified fractions. For example, 16:10 is not simplified, as the simplified fraction would be 8:5.
When it comes to UI, the resolution of your game will be incredibly important. If you'll build to a single resolution/aspect ratio, the UI will be much easier to deal with. However, if you'll build a game that you want to run on multiple resolutions/aspect ratios (for example, a mobile project), you want your UI to scale appropriately, and you want to be able to easily change the resolution of your game so that you can test that it is scaling properly.
Even if you will allow your resolution and aspect ratio to vary, you should still decide on a default resolution. This default resolution represents the resolution of your ideal design. This will be the resolution that your initial design and UI layout is based on, so if the resolution or aspect ratio varies, the UI will try to maintain the same design best as it can.
- Data Visualization with D3 4.x Cookbook(Second Edition)
- Python 深度學習
- Vue.js 3.x從入門到精通(視頻教學版)
- Java從入門到精通(第5版)
- Mastering Kotlin
- 軟件測試項目實戰之性能測試篇
- Learning Linux Binary Analysis
- 零基礎學Python數據分析(升級版)
- 你不知道的JavaScript(中卷)
- WebRTC技術詳解:從0到1構建多人視頻會議系統
- SQL Server數據庫管理與開發兵書
- Geospatial Development By Example with Python
- 微課學人工智能Python編程
- Instant GLEW
- C++17 By Example