ID:2140463
 
(See the best response by Kaiochao.)
Code:
winset(src, "default", "titlebar=false;is-maximized=true")


Problem description:
If I use the above code I can make my game "fullscreen" but it doesn't really make the map fullscreen (my map is the only object in the window with anhors of 0, 0 and 100, 100 and it fills the entire window.

What happens is the map gets black borders on the side and top instead of stretching to fit the fullscreen. Any ideas on how to make the contents of the map fill the screen instead of having the black border. Also, I would prefer not change world.view if possible.
If you don't want to change world.view, you could change client.view.

Or you can disable letterboxing.
Disabling letterboxing and settings the icon-size to 0 makes it work without having to change any of the views, like this:

winset(src, "default.map", "icon-size=0;letterbox=false")

But now I have another problem, In order to zoom in I do something like this:

var/world_zoom = 1
client
verb
zoom_in()
world_zoom += 0.1
winset(src, "default.map", "zoom=[world_zoom]")

Which works fine before fullscreen mode. After I go into fullscreen, the doing any sort of zoom will reenable the letterboxes.
In response to TheRainingLeaf
Best response
Setting the "zoom" parameter is just another way of setting the "icon-size" parameter. If your world.icon_size is 32, then "zoom=1" is equivalent to "icon-size=32", "zoom=2" is equivalent to "icon-size=64", and "icon-size=16" is equivalent to "zoom=0.5". When one is changed, both are changed at the same time. Stretch to Fit uses "icon-size=0" and "zoom=0", but the map is still zoomed by some internally-calculated number.

Is your world_zoom supposed to be an offset of the zooming that it's already doing for Stretch to Fit? If so, you'll have to rewrite the built-in Stretch to Fit mode in terms of actual zoom values. If the map element is resizable, you might have to make sure to recalculate it as the map resizes, like the built-in Stretch to Fit does.

If your world_zoom is supposed to be the actual size scale (i.e. world_zoom=1 corresponds to "zoom=1"), then expect letterboxes past where client.view covers for low zoom levels. I mean, if you set zoom to 0.01, you're probably going to see a lot of void. The solution to this is just to increase client.view so that it at least fills the size of the map element.


I kind of recommend only using integer zooms though. That is, zoom=1, zoom=2, zoom=3, etc., not zoom=0 or zoom=1.5, zoom=1.333, etc. It keeps pixel art from being distorted by interpolation, since they are still limited to whole pixels on your physical monitor.

To clarify, client.view can be different for each client. It defaults to world.view. It's what people use to fill the screen in fullscreen games that don't use Stretch to Fit.
In response to Kaiochao
Kaiochao wrote:
If your world_zoom is supposed to be the actual size scale (i.e. world_zoom=1 corresponds to "zoom=1"), then expect letterboxes past where client.view covers for low zoom levels. I mean, if you set zoom to 0.01, you're probably going to see a lot of void. The solution to this is just to increase client.view so that it at least fills the size of the map element.

This is what my world_zoom is.

So I had to end up writing my own stretch to fit function because client.view begins to render more tiles than I want to be visible to the player.

Thanks for your help.