多种屏幕分辨率/高宽比(游戏) [英] Multiple screen resolutions/aspect ratios (games)

查看:248
本文介绍了多种屏幕分辨率/高宽比(游戏)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑:感谢您​​的答案和注释。 想着它,我改写了问题的核心后:如何确定并限制最小分辨率/比我的游戏能够运行。由于海事组织无论是游戏变得无法播放上最小的屏幕/比率(缺乏细节),或者支持,即使是最小的屏幕/比率降低了经验,为所有其他显著。此外,我们甚至不知道的最小分辨率是什么,或者可以以任何方式比禁用LDPI ......仍然没有告诉我们关于最小MDPI其他限制它。毕竟我不是想着如何创造一个良好的结果,但有关如何创建一个完美的结果)。猜猜这是不可能的(没有?)。

Thanks for all your answers and comments. After thinking about it i would rephrase the core of the question to: "How to determine and limit the minimum resolution/ratio my game is able to run on". Because imo either the game becomes unplayable on the smallest screen/ratio (lack of detail) or supporting even the smallest screen/ratio degrades the experience for all the others significantly. Besides we do not even know what the smallest resolution is or can restrict it in any way other than disabling ldpi... which still doesn't tell us about the smallest mdpi. After all i'm not thinking about how to create a good result but about how to create a perfect result ;). Guess it's not possible (yet?).

注意:这纯粹是关于手机不是平板电脑 另外这个问题是不是相关的应用程序,因为它是游戏不使用Android的布局系统。

Note: This is purely about phones not tablets Also this question is not that relevant for applications as it is for games which don't use the Android layout system.

我总是发现该决议的期望有些模糊的定义。 我知道了列表在文档中。

I always found the definitions of which resolutions to expect somewhat vague. I am aware of the list in the docs.

现在我的第一个问题是,如果这个名单是完整的,或者换句话说是制造商不允许使用其他reolutions或纵横比。 我目前的做法是,把这个列表中的纵横比而言,看起来类似的东西(不知道这是否是准确的,但你的想法):

Now my first question is if this list is complete or in other words are manufacturer allowed to use other reolutions or aspect ratios. My current approach is to view this list in terms of aspect ratios which looks something like that (Not sure if it's exact but you get the idea):

  • LDPI:最小的宽高比​​例为4:3
  • MDPI:最小长宽比3:2
  • 华电国际:最大的纵横比为16:9

所以,如果我想覆盖范围内的设备我找出我最小,我最大的纵横比和设计布局为最小,同时也使自动增长到最大。 例如,如果我想支持所有密度i设计的屏幕为4:3,并使其成长为16:9。如果我删除LDPI的支持,我会设计为3:2。 当然,这种假设永远不会有一个MDPI设备具有宽高比为4:3,将我们带回到我的第一个问题。

So if i want to cover a range of devices i figure out what my smallest and my biggest aspect ratios are and design the layout for the smallest while making it automatically grow to the biggest. For example if i want to support all densities i design the screens for 4:3 and make it grow to 16:9. In case i remove ldpi support i would design for 3:2. Of course this assumes there will never be an mdpi device with an aspect ratio of 4:3 which brings us back to my first question.

我的preferred的解决办法是,表示对Android市场哪方面比我的应用程序可以处理,但似乎并不可能这么远。

My preferred solution would be to indicate on the Android Market which aspect ratios my application can handle but that doesn't seem possible so far.

有没有人有一个更好的办法? (请记住,这是对手机游戏只)

Does anyone have a better approach? (Keeping in mind that it's for games on phones only)

推荐答案

我找到了一个明确的答案的问题。

I found a clear answer to the problem.

最小分辨率是不确定的前3.0。 因此,对于3.0及以上,将有可能选择一个最小分辨率,设计了一个游戏的基础上,并为提到superM等人对大屏幕/比增长动态的布局。

Minimum resolutions are undefined prior to 3.0. So for 3.0 and above it will be possible to choose a minimum resolution, design a game based on it and grow the layout dynamically on larger screens/ratios as mentioned by superM and others.

当你设计的用户界面为不同的屏幕尺寸,你会发现,   每个设计需要的空间最小量。因此,每个广义   上面的屏幕尺寸有一个被定义相关的最低分辨率   由系统。这些最小尺寸的DP单位,同一单位   定义你的布局,它允许系统时,你应该使用   避免担心改变屏幕密度。

As you design your UI for different screen sizes, you'll discover that each design requires a minimum amount of space. So, each generalized screen size above has an associated minimum resolution that's defined by the system. These minimum sizes are in "dp" units—the same units you should use when defining your layouts—which allows the system to avoid worrying about changes in screen density.

      
  • XLARGE屏幕至少960dp x 720dp
  •   
  • 在大屏幕至少640dp x 480dp
  •   
  • 在标准屏幕至少470dp x 320dp
  •   
  • 在小屏幕至少426dp x 320dp
  •   
  • xlarge screens are at least 960dp x 720dp
  • large screens are at least 640dp x 480dp
  • normal screens are at least 470dp x 320dp
  • small screens are at least 426dp x 320dp

注意:这些最小屏幕尺寸分别为没有得到很好的之前定义   安卓3.0 ,所以你可能会遇到一些设备是错误归类   之间的正常和大。这些也基于所述物理   屏幕的分辨率,因此可以跨设备,例如改变   1024x720平板电脑的系统栏实际上有少一点空间   提供给应用程序,由于它正在使用的系统酒吧

Note: These minimum screen sizes were not as well defined prior to Android 3.0, so you may encounter some devices that are mis-classified between normal and large. These are also based on the physical resolution of the screen, so may vary across devices—for example a 1024x720 tablet with a system bar actually has a bit less space available to the application due to it being used by the system bar.

来源

这篇关于多种屏幕分辨率/高宽比(游戏)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆