Hello,
I am quite new to gideros and game development as well. I am trying to build a game, It looked fine with the Gideros player, but when I tried with android phone, the background was way too small, so I changed its properties to autoscaling so as to fit in with the width.The background now fits in the width but other objects seem to go to absurd locations, though I was using W, H = application:getDeviceWidth(), application:getDeviceHeight() , and while setting up the location, used W/2 and H/2 instead of hardcoding it.
What can I do to fix it?
Thanks
Comments
I think:
Scale Mode: Letterbox (example: 320x480, background image should be with higher dimension, see image)
W = application:getContentWidth()
H = application:getContentHeight()
background:setAnchorPoint(0.5, 0.5)
background:setPosition(W/2, H/2)
Also read:
http://appcodingeasy.com/Gideros-Mobile/Ignore-Automatic-Screen-Scaling-when-positioning-objects
Likes: ar2rsawseen
I, J= application:getLogicalTranslateX()/application:getLogicalScaleX(), application:getLogicalTranslateY()/application:getLogicalScaleY()
W, H = I + application: getDeviceWidth()/2, J + application: getDeviceHeight()/2
this piece of code worked