How To Make Love2d Game Display. The Same on All Mobile Size Screens?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 25
- Joined: Sat Aug 03, 2019 11:56 am
How To Make Love2d Game Display. The Same on All Mobile Size Screens?
If You Have. A Big Mobile Screen Phone It Display The Same If You Have a Small Mobile Screen Phone. <--How To Do This?
Re: How To Make Love2d Game Display. The Same on All Mobile Size Screens?
Making the game look exactly the same on any display par for the course. You scale game content up and down (usually through camera zoom) depending on resolution, so that 1 in-game screen always takes 1 physical screen no matter the resolution. You'll get some cropping on the top-bottom or left-right edges depending on specific method and screen aspect ratio. The only way around it is to enforce content aspect ratio by padding it with black bars. Some games forego this and just render at native resolution, so a bigger screen can fit more of the game content.
Some games opt to use the same uniform scaling strategy for UI, making it look the same on any screen. Others render UI at a native resolution so it looks smaller on higher resolution screens. DPI scaling is an OS setting that tells you how much you should scale UI elements so that they will appear appropriately large - you are free to ignore it, but you really shouldn't, especially on mobile devices with cramped touchscreens. If your application doesn't handle DPI scaling manually, then OS will give you a low resolution content window and upscale it to native resolution, to the same effect.
Some games opt to use the same uniform scaling strategy for UI, making it look the same on any screen. Others render UI at a native resolution so it looks smaller on higher resolution screens. DPI scaling is an OS setting that tells you how much you should scale UI elements so that they will appear appropriately large - you are free to ignore it, but you really shouldn't, especially on mobile devices with cramped touchscreens. If your application doesn't handle DPI scaling manually, then OS will give you a low resolution content window and upscale it to native resolution, to the same effect.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot], Yolwoocle and 226 guests