ID:159838
 
<script type='text/javascript'>
var height = screen.height;
var width = screen.width;
document.location.href='byond://?action=get_resolution&height=' + height + '&width=' + width;
</script>

Forum search IS your friend, and I found this little snippet of code that Tiberath wrote using it.
This goes a little over my head though...sorry to say. I'm not actually sure how to implement this into my code to get the player's sreen resolution. Could anyone tell me how to?
look up for client/Topic() on DM reference.
Fugsnarf wrote:
> <script type='text/javascript'>
> var height = screen.height;
> var width = screen.width;
> document.location.href='byond://?action=get_resolution&height=' + height + '&width=' + width;
> </script>
>

Forum search IS your friend, and I found this little snippet of code that Tiberath wrote using it.
This goes a little over my head though...sorry to say. I'm not actually sure how to implement this into my code to get the player's screen resolution. Could anyone tell me how to?

You can send that through the browse(text/file/null, Optional flags) function. If you use the browse function, it will be sent to the default browser control, which you may not want. I suggest looking up the browser control in the skin reference.
var/htmlText = {"
<html>
<head>
> <script type='text/javascript'>
> var height = screen.height;
> var width = screen.width;
> document.location.href='byond://?action=get_resolution&height=' + height + '&width=' + width;
> </script>
</head>
<body>
</body>
</html>
"}


// You probably want to place this in your mob/Login()
usr << browse(htmlText)


After the above browse function is run, you will receive the players screen resolution through the client/Topic() function.
client/Topic(href,href_list[])
var/height=0
var/width=0
if(href_list["action"] == "get_resolution")
height = text2num(href_list["height"])
width = text2num(href_list["width"])
else ..()


text2num if you don't know just turns a text string to a number.

See references
browse()
client/Topic()
In response to Green Lime
then I just use the height and width vars to specify how big the screen resolution should be?
In response to Fugsnarf
height and width are in pixels. If you want a fullscreen map with little or no black space on the sides, divide the numbers by 32 (32x32 pixels per tile) and set that as your client.view.
client/Topic()
//...
view="[width/32]x[height/32]"

In response to Kaiochao
alright. And with all of this in, it should be a fullscreen game regardless of the screen resolution of the player?
In response to Fugsnarf
If you use his snnipet yes, if the screen resolution cannot be divided exactly with 32 there will be some black space, but, you could use winset() and edit the window's is-maximized param to true and you'll fix that trouble.
In response to Dominico
got it. thank you all for your help