2D opengl 游戏中多屏幕支持的提示?
支持多屏幕的问题已经被问到死了,但我还没有看到太多关于游戏开发的讨论(使用碰撞箱、碰撞检查等)。
目前,我的游戏正在“兼容模式”下运行,由于升级,在高端设备上产生的视觉效果非常差。我正在寻找其他人为使他们的游戏图形在所有屏幕尺寸上看起来都很好而所做的工作的提示和建议。
开发人员是否包含每种资源(中密度和高密度)的 2 个副本,或者高密度资源是否只是针对较低密度设备按比例缩小?
您的计算中是否使用了与密度无关的像素?
The question of supporting multiple screens has been asked to death, but I haven't seen much discussion in regards to game development (with hitboxes, collision checking, etc).
Currently, my game is running in "compatibility mode" producing very poor visuals on higher end devices due to upscaling. I'm looking for tips and recommendations for what others have done to make their games graphics look good across all screen sizes.
Do developers include 2 copies of each resource (medium and high densities) or are high density resources simply scaled down for lower density devices?
Are density-independent pixels used in your calculations?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是处理问题的一种方法,我已经看到了以下工作:
当使用方法 2. 或 3 时,我的处理方式是:
这为我提供了未来计算所需的屏幕密度值。
我更喜欢方法 3。
我目前正在开发一个等距 2d 游戏引擎,该引擎从磁盘加载 .svg 资源,然后在舞台的“加载”部分将它们“绘制到位图”。通过这样做,我在运行游戏时获得了较小的磁盘空间 (.svg) 和更快的性能(位图)的优势。
工作流程如下:
是的,我使用它如下:
This is one way to handle things, I have seen the following done:
When using method 2. or 3. this is the way I handle it:
This gives me the screen density value I need for future calculations.
I prefer method 3.
I'm currently working on a isometric 2d game engine that loads .svg assets from disk then "draws them to a bitmap" during the "loading" portion of the stage. Doing this I get the benefits of small size on disk (.svg) and faster performance (bitmaps) while running my game.
The workflow is as follows:
Yes, I use it as follows:
许多开发人员包含资源的两个副本或在首次运行时下载高分辨率副本。如果他们在第一次运行时下载,那么他们就不会使用 Android 资源管理器。
Many developers include two copies of the resources or download high resolution copies on first run. If they download on first run, then they are not using the Android resource manager for those.