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 / [SOLVED] Background position

Author
Message
Rocco Sette
6
Years of Service
User Offline
Joined: 2nd Aug 2017
Location:
Posted: 11th Aug 2018 16:57 Edited at: 11th Aug 2018 17:00
Hi,

When i trying to set a position of my "splashscreen", all works correctly for me, but for a friend, i get this (screen of attachment).

For me the bug is while the sync of sleep function.

Why ?

This is my code to show it :


For him, all is perfect just after the begin of the fade (the for loop).
But before, he got the bug.

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 13th Aug 2018 11:30
It's really hard to test this with any accuracy. I tried with the code provided but after making it compile I didn't see any issues. This is probably down to how you are setting the screen size/resolution. Take a look at GetMaxDeviceWidth instead of GetDeviceWidth for a start. I would be happy to test the full code for you but there isn't enough here to narrow it down.
Using AppGameKit V2 Tier 1
Rocco Sette
6
Years of Service
User Offline
Joined: 2nd Aug 2017
Location:
Posted: 15th Aug 2018 20:57 Edited at: 15th Aug 2018 21:01
After thinking, i'm sure that come become the orientation changed.

I don't understand, i put in portrait before using Sync()

I use


How can i charge the screen after orientation it's correct ?
puzzler2018
User Banned
Posted: 15th Aug 2018 21:05
This maybe wrong

if (GetDeviceBaseName() = "linux" or GetDeviceBaseName() = "windows")
screen_game_type.resolution_x = 1440
screen_game_type.resolution_y = 2560
else
screen_game_type.resolution_x = 1440
screen_game_type.resolution_y = 2560
endif

Why not set the Virtual resolution to be the same as your device - with this your hard coding screen sizes into your app - which will cause many issues

smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 15th Aug 2018 23:57
This post has been marked by the post author as the answer.
it can take a while for the orientation to swap so use a loop to check if the height is greater than the width (or vice versa for landscape) before continuing the code
i.e.
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu

Login to post a reply

Server time is: 2024-04-18 11:20:58
Your offset time is: 2024-04-18 11:20:58