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 Studio Chat / [SOLVED] Screen inquiries

Author
Message
Wizard Ranch
2
Years of Service
User Offline
Joined: 24th Dec 2021
Location:
Posted: 21st Jan 2022 20:30 Edited at: 21st Jan 2022 20:37
Hi all.

I have a few troubles with the screen setup on my game.

Edit: Ignore point 1, on new projects I can set fullscreen without a problem. It will probably take too long to find out why full screen isn't working for this particular case.
1) How do I set fullscreen on my game?
I tried any combination of SetWindowSize( 1024, 768, 1),SetWindowSize( 1024, 768, 1 ,1)/SetWindowSize( 1024, 768, 1 ,0) with and without AllowWindowResize.
But the game never plays in fullscreen. It always opens as the detached app window 1024x768.

2) When I resize the screen I can all of a sudden see all the sprites that are positioned outside of the screen, and that I don't want be visible. How can I make it so that I only see black outside the screen resolution, even when the window is being resized?

3) Each time I load a new scene using AGKs own function, like scene_setup(), the window goes back to it's standard format size from the beginning of the game, after I have resized it manually. How do I avoid this from happening?

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

Go to answer

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 22nd Jan 2022 03:46 Edited at: 22nd Jan 2022 03:48
This post has been marked by the post author as the answer.
Wizard Ranch
2
Years of Service
User Offline
Joined: 24th Dec 2021
Location:
Posted: 30th Jan 2022 14:19 Edited at: 30th Jan 2022 14:20
Thanks VirtualNomad, that worked! I finally got to try it out!

Every sprite I use in game, I run it through that command once in the beginning, and then it works.
Wizard Ranch
2
Years of Service
User Offline
Joined: 24th Dec 2021
Location:
Posted: 7th Feb 2022 21:57
I will add a little thing here, that for all intense and purposes the command

SetScissor(x1,y1,x2,y2)

is much more convenient than SetSpriteScissor for what I was trying to do.

You don't need to loop every sprite through SetSpriteScissor(...) but simply call once in the beginning of the game SetScissor with the correct screen coordinates,
and all sprites are cut to the screen size automatically.

Login to post a reply

Server time is: 2024-03-28 12:29:57
Your offset time is: 2024-03-28 12:29:57