How To Make Love2d Game Display. The Same on All Mobile Size Screens?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Donut-Dezz
Prole
Posts: 25
Joined: Sat Aug 03, 2019 11:56 am

How To Make Love2d Game Display. The Same on All Mobile Size Screens?

Post by Donut-Dezz »

If You Have. A Big Mobile Screen Phone It Display The Same If You Have a Small Mobile Screen Phone. <--How To Do This?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: How To Make Love2d Game Display. The Same on All Mobile Size Screens?

Post by raidho36 »

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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot], Yolwoocle and 226 guests