Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Small error in android player 1.072 ?

Author
Message
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 11th May 2012 19:57
When I set up a virtual resolution of 1280*800 and load a 1280*800 sized .PNG image, it gets scaled down to 1/4'th of it's size. I have to use setspritesize(sprite,1280,800) for it to display correctly. This was not so in 1.065...

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 12th May 2012 05:41 Edited at: 12th May 2012 06:35
Ah, perhaps this is the odd image size bug which I have seen about. Batvink has had similar issues, but in reverse! I think that was on the PC but couldn't say for sure.

I noticed some of my graphics didn't look like they were placed correctly on my latest project. It only does it on android and it isn't immediately obvious, so I haven't worried too much as yet, but will have to address it very soon. I thought it would be a float problem with the co-ordinates, but maybe not by the sounds.

I might reinstall 1065 and try it in that, as I haven't used any specific new commands yet. I imagine I can install it alongside 1072 if I choose a new folder.

Have you tried setresolutionmode? It could be a bug related to it's scaling options for phones. Perhaps it is failing to rescale the image size up after scaling it down for speed, if you have set it to 0 on an android. I am unsure which it defaults to if you do not set it.

Edit - Tried it on my game. Setresolutionmode made no difference to the bug from what I can see. In fact now I look closely, I can see most my images are smaller, it's just harder to spot it one those.

Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 12th May 2012 11:24
Another problem is that on Android devices, the app allways starts in the default orientation, you will have to tilt it over, and back to get it right. It does not check the current gyrometer values. It did in 1.065...

My solution to this problem, is to make a button ingame, where the user can flip the orientation manually, using the setorientationallowed(a,b,c,d) command, if you add a sync() after that, it changes the orientation to the new setting.

untested code idea:



----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Marl
13
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 12th May 2012 11:57

I Don't think that's quite right
0 becomes 0 * -1 = 0
1 becomes 1 * -1 = -1

Try this, it's a tad smaller

0 becomes 1 - 0 = 1
1 becomes 1 - 1 = 0
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 12th May 2012 11:59
Yes it failed, it's early saturday morning in norway! HAHA

I used this code, and it works.



----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.

Login to post a reply

Server time is: 2024-11-23 11:11:18
Your offset time is: 2024-11-23 11:11:18