Page 1 of 1

Dynamic window (using version

Posted: Thu Feb 21, 2019 7:45 am
by Holger
From: Eizzoux
I can't really seem to figure out how do I work with dynamic windows. I guess, border_[left/right/top/bottom] is like border_size but for each size separately and margin_[left/right/top/bottom] for empty border... or like that. I guess it also stretches to the resolution of the monitor dimentions and keeps the it the same no matter is it windowed or fullscreen. I only did the window and playfield, while the door 1 and door 2... I can't seem to move them. And also I'm pretty sure I can't stretch the border graphic for now.
First of all: Please ask such questions as public posts, not as private messages, so others can read the answer, too! :)

Regarding ".border_[left/right/top/bottom]" for viewports, it's just the same as ".border_size", but for each border individually.

Regarding ".margin_[left/right/top/bottom]", it sets a margin for the playfield, to be able to say "playfield should be as wide as the window, minus x pixels", which wouldn't be possible with absolute values for the playfield size.

Please have a look at the following example (attached), which can be used with different screen sizes, always dynamically adjusting to the correct size (width-only here, so only landscape modes supported). While the menus are static (with differently sized borders, depending on screen width), modes "playing" and "editor" make use of the full screen width that is available. (Bonus: The level editor is usable on smaller touch displays, like those of phones and tablets.)

Re: Dynamic window (using version

Posted: Sat Feb 23, 2019 6:32 am
by Eizzoux
Alright, I see, I kinda figured that out, but I'm still kinda hoping we'll be able to "stretch" game border graphic. I tried to do it by myself by adding two global anims aligned to each side of the screen, but I forgot that global anims can't be aligned. Well, I tried :lol:
aldn2.png (6.87 KiB) Viewed 1289 times
aldn1.png (243.07 KiB) Viewed 1289 times