Hellooo
i just tried out gideros and i'm really liking it so far, also i'm pretty new to mobile games
so i've been struggling with this for well over a week now (checking out other engines too)
and basically i want to know how to properly position my ui elements across the screen in a responsive and efficient way
so i got a couple questions
(1)
the method i'm using right now is a 320 x 480 logical scene with a 570 x 360 background which i'll scale up, and i'm planning on positioning my elements using api's that target the actual device's resolution but here's my issue
when i set the orientation to landscape left and position my background(to 0,0), i get a blackspace on the side and my x coordinates seem like they moved, my guess is it's making up for the android navigation bar that's gone?
i'm also not sure if selecting landscape left in properties is the most efficient way to set the default orientation, it seems to work fine tho but i'm too novice to tell for sure
(2)
could someone please tell which api's are used to deal with responsive positioning, i know i'd probably find them eventually on my own but this way i can save some time and i'll know for sure c:
something like a list of preset variables like screenLeft = "insert corresponding api", just to get me going would be amazing
Comments
http://docs.giderosmobile.com/automatic_screen_scaling.html
Likes: Apollo14
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: antix, oleg, snooks, Apollo14, SinisterSoft, totebo
Scaling is one of those things that for me has been a real headache. Mostly this springs from so many devices out there with so many different resolutions and aspect ratios. It seems you have to choose fitWidth, fitHeight, etc based on what the current device uses and it's a pain. I wonder if this could be handled internally?
but getting this error:
index '__userdata' cannot be found
project = 800 x 480
iPad = (2048 x 1536)
iPhone 5 (1136 x 640).
2048/1536 = 1,33333333333
800/1,33333333333=600,01
1136/640 = 1,775.
480 * 1.775 = 852
background = 852 x 600
Likes: antix
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Make the background larger and centered
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: oleg, antix
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I use:
logical Dimensions =1920/1200 = 16/10
background = 2133/1440 --(2133/1200 = 16/9) x (1920/1440 = 4/3)
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
hmmm almost there i think but i dont quite get it yet, my background is perfectly centered now and i can position my elements at the top and bottom edge of my 16:9 phone but they're still like bound to the letterbox i think, can't get them to the far left or right edge
i'm not sure what you meant with make the background larger and centered, it already takes up my screen nicely and the previous thing you mentioned already works fine (background:setPosition(-dx,-dy), also thanks alot btw you've been a great help already and thx @keszegh, that did it, and sry for beign such a noob guys xd
when i use (screenWidth, screenHeight) for "restore" it seems to go a little off screen, however when i use screenLeft instead of screenWidth it's perfectly at the edge where i want it
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: oleg, antix, talis
@hgy29: yes, thanks for that... it's very useful!
Likes: antix
Likes: snooks, hgy29