Coordinates change with the device's resolution?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JCNegar

Hello there. I hope everyone is doing fine.

I am currently working on a mobile games that uses math on a lot of coordinates. I’d like to ask the following: Does exporting the game mess up with those coordinates? Especially that mobile devices have different resolutions ( I am using keep / 2d for this project ). For example, Is point A(250,300) in the editor the same point for all devices and all resolutions?

Hope I made sense. Thanks

:bust_in_silhouette: Reply From: Ertain

The coordinates are going to change for a mobile game because of those different resolutions. It may be best to design the game with variable resolutions in mind, i.e. using hard-coded x- and y-values should be avoided. Instead, look into checking the dimensions of the display so as to place objects.

More resources:

Thanks a ton, I’ll keep this in mind.

JCNegar | 2022-04-08 13:16