Oh no: again screen dimension !! ;(

I’m building a multiplayer game: each player has his own playing field represented on his display. Common objects must move on each display.

I realized that each display has different dimensions.

The documentation on the transitions https://docs.coronalabs.com/guide/media/transitionLib/index.html speak about " x/y coordinate". It is not clear whether they are pixels or units.

Isn’t there a way to move objects in a virtual field defined in config.lua which will then be scaled according to the display of each player?

Otherwise the only solution I see is a proportion that each player must make compared to a reference player field.

any suggestions are welcome

Renato

Basically, code using relative coordinates rather than absolute coordinates.
I made a sample. sample.zip (4.5 KB)
Check config.lua and main.lua.

1 Like

Thank you!
I will study it and say you something later.

Renato

Dear Super_Toki,

I didn’t understand very well what you did. :wink:
But the situation is almost perfect.
Thanks!

Renato