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.

Newcomers AppGameKit Corner / Full Screen Problems

Author
Message
Stephen Elliott
6
Years of Service
User Offline
Joined: 31st Jul 2017
Location:
Posted: 2nd Aug 2017 11:12
I'm very new to AppGameKit so maybe I'm doing something wrong, but I'm getting different results in windowed mode compared to full screen mode. Full screen mode seems to be around 200 pixels out.

I've commented the problem in the below code. The ships slide onto the screen and slide off to the right.

In windowed mode SetWindowSize(1024, 768, 0) it works correctly. The start position is -64 (the sprite is 64 pixels in size) and the final position is 1024 (screen width).
However, in full screen mode I have to set start position to -256 and end position to 1200 - or the sprite starts around 200 pixels in and finishes 200 pixels from the screen edge.

Attachments

Login to view attachments
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 2nd Aug 2017 15:58
you need to take screen bounds into account when going full screen

set your virtual width = to GetScreenBoundsRight() and your height = to GetScreenBoundsBottom(), your left edge will be 0-GetScreenBoundsLeft() and your top 0-GetScreenBoundsTop(), basically the whole screen moves around a little to take any space where there would usually be black borders, you use these functions to get around that.

https://www.appgamekit.com/documentation/Reference/Core/GetScreenBoundsRight.htm
Stephen Elliott
6
Years of Service
User Offline
Joined: 31st Jul 2017
Location:
Posted: 2nd Aug 2017 19:33 Edited at: 2nd Aug 2017 20:11
Thanks for your help PartTimeCoder!

The following code now works as per your instructions.

Login to post a reply

Server time is: 2024-04-27 04:53:40
Your offset time is: 2024-04-27 04:53:40