GameMaker Studio 2 Desktop

GameMaker Studio 2 Desktop

Did they fix the window size = room size thing?
That was basically the biggest issue I had with GMS 1.4. Does it work more like Unity now? As in, you create your camera size/aspect ratio and then it is automatically scaled to the resolution the user selects?
< >
Wyświetlanie 1-8 z 8 komentarzy
Baguette 20 marca 2017 o 20:18 
There's no launcher if that's what you mean, if you want the User to have their own resolutions you'll have to code it yourself, there are a lot of tutorials out there and it's quite easy to do. You can however change camera view and port to auto scale it somewhat but the user changing it would still require code.
Jeed 21 marca 2017 o 0:34 
By default, viewports are disabled.
So by default the client window size will be the size of the default room, yes.

If viewports are enabled, the default client window size will be the size of the default viewport of the default room.

But these are not locked.
For example, you can have a NES camera and viewport (256x240) with a large room, let's say 4096x4096.
And then you can change the client window size with window_set_size, for example:
// Setting the window size window_set_size(1920, 1080);

So you can easily achieve what you seek.
The resolution of a game and the size of the room(s) in it (e.g. 256x240 and 4096x406) don't have to match the size of the window.
Actually most 2D games these days use much lower resolutions with scaling, by either "full scale" or "keeping aspect ratio" (which can be pixel perfect).

Another thing that may be helpful (taken from gamedev.stackexchange[gamedev.stackexchange.com]):
Początkowo opublikowane przez Kromster:

Camera is like a camera with which Batman movie is filmed. It exists in a virtual world and can be moved around, targeting different scenes, changing focal length and other camera properties. You can have many cameras and switch between them. You can even film on several cameras at once.

Typical camera coordinates are: position in virtual world, facing direction, up-vector, field-of-view, etc.

Viewport is a cinema screen. It is a place where image recorded by camera is shown. In PC world that is an area in the screen within some window or a full-screen image. You can show feeds from several cameras at once (like in those console racing games between 2-4 players).

Typical viewport coordinates are: position on display, height and width.
Ostatnio edytowany przez: Jeed; 21 marca 2017 o 0:57
Scorcher24 21 marca 2017 o 4:48 
Początkowo opublikowane przez Jeed:
By default, viewports are disabled.
So by default the client window size will be the size of the default room, yes.

If viewports are enabled, the default client window size will be the size of the default viewport of the default room.
So they still didn't detach that. Disappointing to hear. Thanks.
Jeed 21 marca 2017 o 5:30 
Początkowo opublikowane przez Scorcher24:
Początkowo opublikowane przez Jeed:
By default, viewports are disabled.
So by default the client window size will be the size of the default room, yes.

If viewports are enabled, the default client window size will be the size of the default viewport of the default room.
So they still didn't detach that. Disappointing to hear. Thanks.
I'm glad I've been able to answer your question but please bear with me for a moment.

The thing we are talking about is implemented by design. It gives more power to you as a developer. It's a good thing, not a bad thing.
World (rooms in GMS), viewports and cameras should be separated. It's pretty much a standard in most video game engines and frameworks.
And having some sort of a reference to the default size for client window is a must. Otherwise what would be the reference that determines the default window size?

However I can see something as being a problem for newcomers.
They could've gone in a different route and have something like a "Default window size" setting within the interface, which will override the defaults (room/viewport).

But that would still be exactly what I mentioned above, which can be done easily with a single line of code.
And you can put that line of code in the default room's creation code. Which will make it so the game will launch with that client window size.
The creation code is executed before the first rendering of the room (and before the creation of the client window), because of that it will be seamless, as the window will not be visible with the default size and then change its size. It will simply launch with the size in that line of code.

It's worth mentioning that you also have methods like window_set_fullscreen and window_set_rectangle which can also be used in the room's creation code (or anywhere else for that matter). Allowing you to achieve even more.
Ostatnio edytowany przez: Jeed; 21 marca 2017 o 5:34
Scorcher24 21 marca 2017 o 6:36 
I am not a big fan of Unity's Workflow, but they did get that right. You never work on a resolution, you also have no set room sizes or any of it. You create your game, you set boundaries for your rooms and the user can select whatever resolution, it will look the same, as long as you take aspect ratio into account when designing your UI. Managing resolutions in 1.4 is a mess and a nightmare. Yes, you can stretch the surface etc pp, I know about all that. But it still makes it a hassle to work with. I am seriously considering learning Unity more, even though I like the workflow in GMS for 2D games better.

Also the limits on the room sizes constrict you a lot in what type of games you can do.
Ostatnio edytowany przez: Scorcher24; 21 marca 2017 o 6:37
Jeed 21 marca 2017 o 6:48 
Początkowo opublikowane przez Scorcher24:
I am not a big fan of Unity's Workflow, but they did get that right. You never work on a resolution, you also have no set room sizes or any of it. You create your game, you set boundaries for your rooms and the user can select whatever resolution, it will look the same, as long as you take aspect ratio into account when designing your UI. Managing resolutions in 1.4 is a mess and a nightmare. Yes, you can stretch the surface etc pp, I know about all that. But it still makes it a hassle to work with. I am seriously considering learning Unity more, even though I like the workflow in GMS for 2D games better.

Also the limits on the room sizes constrict you a lot in what type of games you can do.
I think I got it now :P
I misunderstood what you disliked about how it works with GMS, apologies. But I get what you mean now.

Yeah, in GMS you'd have to do most of it manually.
The workflow in that regard requires some extra work in comparison to Unity.

Edit:
I know this doesn't change the fact that it's still different from Unity.
But since you said you actually like the workflow in GMS for 2D games better, I just wanted to say that if you are willing - you can actually code your own Unity-like launcher for a GMS game.
I've looked at your profile and have seen some of your GMS 1.4 guides (good job by the way :D), you definitely have the experience and the knowledge to do it.
If you ever get a chance to use GMS2, cameras and viewports are slightly different now, so you can always give that a chance.

Either way, best of luck with your game development! :)
Ostatnio edytowany przez: Jeed; 21 marca 2017 o 6:59
Scorcher24 21 marca 2017 o 6:54 
No need to apologize, thanks for putting up with me :fhappy:
Jeed 21 marca 2017 o 7:01 
See edit ^ please :2016popsicle:
< >
Wyświetlanie 1-8 z 8 komentarzy
Na stronę: 1530 50

Data napisania: 20 marca 2017 o 13:15
Posty: 8