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 / [LOCKED] [SOLVED] Rotate Display from within AGK program [ a solution ]

Author
Message
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 8th Sep 2023 04:31 Edited at: 8th Sep 2023 04:32
This post has been marked by the post author as the answer.
I needed to ensure that a game / program I was writing had the desktop orientated correct ( as the monitor mounted in Portait mode )

Download the Display utility from here...

http://noeld.com/programs.asp?cat=misc#display

You can then us RunApp( "Display.exe","/rotate 90" ) on program start to set your desired orientation.

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

Go to answer

PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 8th Sep 2023 16:56
I would advise against rotating a users display without explicit permission (via a dialog) for the same reason that setting the screen resolution became a taboo, users don't like system settings being messed with by 3rd party apps
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 9th Sep 2023 05:40 Edited at: 22nd Sep 2023 15:35
Hi Good point,

But this is for a physical gaming machine ( ie. one you see in an arcade / casino ) to ensure when it's powered on the settings are not lost.

There is little user interaction ( except inserting coins and pressing start / spin )

I use AppGameKit to create machines such as this.. See here for an example

https://forum.thegamecreators.com/outbound?url=https%3A%2F%2Fforum.thegamecreators.com%2Fthread%2F229182%23msg2674770
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 6th Oct 2023 00:53
U could also not run an executable and just render to an image and rotate 90 deg

Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 6th Oct 2023 17:04
Not when using 2D physics..

Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 17th Oct 2023 00:29
I'm not sure why you'd need an App to change the Display Orientation, and call that from within AGK.
IF your Display Hardware is using a different Display Orientation., then either change it in your Graphics Drivers (Linux) or via the Display Settings from Landscape to Portrate (Mac / Windows).

That way the Display will ALWAYS be that Orientation on System Boot, and AppGameKit won't know the difference as it's MaxDisplayWidth/Height will echo whatever it's told by the OS.

If you're on Windows: go to Settings > System > Display
Display Orientation is an option on there, and switch it... you'll see what I mean.
One of my Displays rotates and whenever I turn it 90 Degrees it will automatically apply said Orientation Switch; but I know some don't.

If you're doing this AFTER AppGameKit has started (for some reason) then call UpdateDeviceSize( GetMaxDeviceWidth(), GetMaxDeviceHeight() )
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 17th Oct 2023 01:17 Edited at: 17th Oct 2023 01:20
Hi,

These are physical machines in arcades, to be played by the public, for real money.

To add - they're running Win10IoT - these options are not available via control panel and so on.

Basically, imagine you've created the arcade machine ' donkey kong', it has a coin mech and bill acceptor, the machine uses a monitor in portrait mode.

This is how to ensure the game is always displayed in the correct orientation, once your game is running.

I design and create machines such as this, - and this solution works for me.

Mods, feel free to delete this thread

Login to post a reply

Server time is: 2024-05-03 04:35:27
Your offset time is: 2024-05-03 04:35:27