Zainstaluj Steam
zaloguj się
|
język
简体中文 (chiński uproszczony)
繁體中文 (chiński tradycyjny)
日本語 (japoński)
한국어 (koreański)
ไทย (tajski)
български (bułgarski)
Čeština (czeski)
Dansk (duński)
Deutsch (niemiecki)
English (angielski)
Español – España (hiszpański)
Español – Latinoamérica (hiszpański latynoamerykański)
Ελληνικά (grecki)
Français (francuski)
Italiano (włoski)
Bahasa Indonesia (indonezyjski)
Magyar (węgierski)
Nederlands (niderlandzki)
Norsk (norweski)
Português (portugalski – Portugalia)
Português – Brasil (portugalski brazylijski)
Română (rumuński)
Русский (rosyjski)
Suomi (fiński)
Svenska (szwedzki)
Türkçe (turecki)
Tiếng Việt (wietnamski)
Українська (ukraiński)
Zgłoś problem z tłumaczeniem
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:
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]):
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.
Also the limits on the room sizes constrict you a lot in what type of games you can do.
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! :)