Dynamic window (using version 4.1.2.0)

All about creating levels and level sets, custom elements and custom artwork.

Moderators: Flumminator, Zomis

Post Reply
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Dynamic window (using version 4.1.2.0)

Post 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.)
Attachments
test_custom_viewport_dynamic_3.zip
Dynamic viewports example graphics set
(19 KiB) Downloaded 255 times
User avatar
Eizzoux
Posts: 567
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: Dynamic window (using version 4.1.2.0)

Post 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
aldn2.png (6.87 KiB) Viewed 3660 times
aldn1.png
aldn1.png (243.07 KiB) Viewed 3660 times
𒈟
Post Reply