My experiences with this have been complicated, but very interesting.

Between 3.5 to now, I've seen several glitchy behaviors:

For instance, setting a window to maximized, then getting its size still returns the original size, and not current size.

In order to do this, I had to use a workaround. I used an invisible label anchored to the bottom-right of the map. I then maximized the window, and got the position of the element to determine the size.

Windows vista handles title bars very strangely. When removing them on the fly, they can severely mess up calls to change the size of a window within the same winset.

To do this, I had to use two winsets, one taking the title bar away, then another changing the size of the window. Otherwise, I got some really bizarre results.

Good luck to you!

The formula I tend to use is this:

#define SCRW 1280
#define SCRH 800

map_w = round(window_x/32)
map_h = round(window_y/32)
map_x = (SCRW-map_w)/2
map_y = (SCRH-map_h)/2


I don't like using anchors for this sort of a system, simply because anchors can't snap to every 32 pixels.
In response to Ter13
Read my last response ;)
In response to Rushnut
It's altogether possible that the bugs I mentioned were fixed some time between 3.5 to now, but I first noticed them maybe five months ago, and I infrequently update BYOND.
In response to Falacy
I actually was already attempting this, but thanks for the info on how to do it! :F
In response to Rushnut
No no no. It wouldn't if you won't allow players to stretch it, in skin editor set icon-size to 32 as default, and for extra security set icon-size to 32 on login. Then set only one anchor (top left, bottom right etc). Map won't change it's size then. And only panels will
In response to Ripiz
Nono, the icon size, well, it will stretch, hence the whole stretch to fit idea.
|_| = box

| |
|__| = box after what you said.
In response to Rushnut
If he plan to put all stats, inventory and etc onto map, then yes, it will look like that. But if engine is done properly it won't add any lag in drawing
Personally, I use [link]
In response to Koil
Lol. What I do is go to the skin and go to the map part. I go and un-check the stretch map thing and where you insert the number at just put in a high number say 165 or 200 and their the map will be filling the screen and it will be zoomed in also. I'm sure you can work around this somehow xD or find a way to implant it good. Hope I Helped.
In response to Ssj4justdale
To keep your beautiful icons looking 32x32 no mater the size of the map or screen,

there used to be a beautiful piece of code.

But now it's even easier.

Skin - Map - Options

Unckeck "Stretch icons to fit map".
Rather, set Icon size (in pixels): to 32

Best, Resolution, Ever.

In response to Koil
Why use javascript when BYOND can figure out your resolution on its own? In your interface create a new invisible window with no titlebar or statusbar and call it resolution. Run the following code to grab the players screen size.

client
var/resolution=""
proc
get_resolution()
winset(src,"resolution","size=9999x9999")
var/size=winget(src,"resolution","size")
src.resolution=copytext(size,1,findtext(size,"x"))
winset(src,"resolution","size=1x1")


It's only going to return the horizontal value because that's all you really need. That and the vertical size will always be wrong because of the taskbar.
In response to SuperAntx
If it helps, I've had a lot of luck with this in my world code:

world
{
view = "20x15" // Modify this
}


My resolution's showing up just fine at 32x32, with no extra configuration. I'm using BYOND 4.52, latest version.
Page: 1 2