#define floor(x) round(x)
#define ceil(x) (-round(-x))
#define TILE_WIDTH 32
#define TILE_HEIGHT 32
#define MAX_VIEW_TILES 800
icon_size = 32
set hidden = 1
set waitfor = 0
var/sz = winget(src,"map1","size")
var/map_width = text2num(sz)
var/map_height = text2num(copytext(sz,findtext(sz,"x")+1,0))
map_zoom = 1
view_width = ceil(map_width/TILE_WIDTH)
view_height = ceil(map_height/TILE_HEIGHT)
view_width = ceil(map_width/TILE_WIDTH/++map_zoom)
view_height = ceil(map_height/TILE_HEIGHT/map_zoom)
buffer_x = floor((view_width*TILE_WIDTH - map_width/map_zoom)/2)
buffer_y = floor((view_height*TILE_HEIGHT - map_height/map_zoom)/2)
src.view = "[view_width]x[view_height]"
Problem description: I'm trying to get full screen working for my game, but I'm running into issues. The code above is from the almighty Ter13's article: http://www.byond.com/forum/?post=1816091.
When using any value lower than 2000 for MAX_VIEW_TILES, the screen is super zoomed in and looks terribly blurry, like so: https://gyazo.com/ff3e49de8f077a8d9747bb6660039e40
When using a value of 2000 or higher for MAX_VIEW_TILES, the screen is super zoomed out, but not blurry, like so: https://gyazo.com/411830cbbe2c17b49ee546f797138e25.
There is only two outcomes no matter what value I use, either super zoomed in and blurry, or too zoomed out.
I cannot for the life of me figure out how to make it so the screen is zoomed in the right amount and maintains image quality.
Any help would be greatly appreciated, thanks!