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 / Fullscreen and Scene Editor, how?

Author
Message
slagusev
11
Years of Service
User Offline
Joined: 22nd Jan 2013
Location:
Posted: 12th Oct 2021 14:48
Hello!
I want to use the scene editor for the game. Mobile devices. But whatever code I tried, it still sets the dimensions according to the ratio that is specified in the scene editor (base resolution)
There are black stripes on the device
hosch
Developer
2
Years of Service
User Offline
Joined: 25th May 2021
Location:
Posted: 12th Oct 2021 17:46 Edited at: 12th Oct 2021 18:10
Does the device support the resolution? Does it have the same aspect ratio?

If you set up a scene, you have to set a base and a target resolution in the scene editor. Tick the base and left click the target resolution. If you develop for 1920x1080 and the device is 1560x720 AppGameKit scales down to the nearest possible resolution and puts black bars. With a wide variety of devices these days, it's a lot of work to cover all possible resolutions. One way is by using the percentage based system, creating all assets for different aspect ratios, detect the aspect ratio of the device and load the correct assets. This elimimates black bars pretty much, but triples your asset creation.

Furthermore you can use the SetScissor command to force AppGameKit to use the whole screen. This is somewhat dangerous though, because things that might be off screen in one resolution still are visible in other resolutions. You'd have to catch those exceptions via your code. For example, if you despawn an enemy if it's x is greater than 1560, but the device is 1920, you can't hardcode 1560 but need a variable for the max screen width and use that. AppGameKit supplies ways to get the max width.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 16th Oct 2021 05:20 Edited at: 16th Oct 2021 05:21
@slagusev,

does this mean that you are now able to save scenes with regard to the issue that you reported on the repo? https://github.com/TheGameCreators/AGK-Studio/issues/891.

if so, feel free to Close the issue. otherwise, adding some details to the issue would be most-helpful. ie, operating system, items added to the scene that won't save, operating system, studio version, etc.

i don't mean to side-track this thread but since you're still on moderation, you cannot receive private messages.
hosch
Developer
2
Years of Service
User Offline
Joined: 25th May 2021
Location:
Posted: 18th Oct 2021 10:46
Furthermore, I would like to know if my answer resolved your issue. If so, please mark the thread as answered.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 25th Oct 2021 01:35 Edited at: 25th Oct 2021 01:35
Quote: "But whatever code I tried, it still sets the dimensions according to the ratio that is specified in the scene editor (base resolution)"


The scene settings are overriding the main.agc settings because the OP needs to call Menu_create_window(0) before Menu_setup() to tell the scene file not to change them
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
DewarInversion
3
Years of Service
User Offline
Joined: 27th Mar 2021
Location:
Posted: 8th Nov 2021 17:22
SetWindow() is called too many times.!!
I'm getting the same thing. It is possible to go into the scene editor script and switch on full screen manually (readmode set to off), however, if you have more than one scene in the same scene file, it is impossible to switch it off for all scenes. It would be best if this automatic code is removed so the first instance is the primary. I've added an entry on github

Login to post a reply

Server time is: 2024-04-20 03:29:07
Your offset time is: 2024-04-20 03:29:07