ID:2020124
 
Code:
mob
player
icon = 'player.dmi'
Login()
..()
winset(src, "default", "is-maximized = true")
client.adjust_tiles()
world << "[src.name] logged in!"

client
perspective = EDGE_PERSPECTIVE
proc
adjust_tiles()
var
size1 = winget(src, "map1", "size")
width = text2num(size1)
height = text2num(copytext(size1, findtext(size1, "x") + 1))
xxx = round(width/world.icon_size)
yyy = round(height/world.icon_size)
view = "[xxx]x[yyy]"


Problem description: I use the above code in an effort to 1) make the window of the player full (I use a custom window) 2) After that, adjust the tiles horizontally and vertically so that the maximum number of tiles are placed on screen (with adjust_tiles proc of client). This causes the screen to flicker though at the edges of the screen

https://gyazo.com/e2aa776836cc96e0820f9897e7c53015

If I move the character near the middle, it stop flickering. It also stop flickering completely even in the edges if I remove the edge_perspective from the client but I need that. What could be wrong? Thx

(Proven Redundant)

Well, there's a major problem here: you're not properly grabbing the width of the map.

var
size = winget(src,"map1","size")
x = findtext(size,"x")
width = text2num(copytext(size,1,x))
height = text2num(copytext(size,x+1))
view = "[round(width/world.icon_size)]x[round((height/world.icon_size)]"
Actually, Konlet, he is.

var/val = "41x13"
text2num(val) //returns 41
text2num(copytext(val,findtext(val,"x")+1)) //returns 13


The first copytext is unnecessary because text2num automatically quits when a non-numeric character is found in the sequence.


Just at a glance, though, OP, this looks like a bug.
I didn't know, that's interesting.

This could be an issue with the map file, in the case that your view is trying to display more tiles than the max x and y hold.

Example: If your view is "10x10" but your map is 9x9, issues could arise.
In response to Konlet
Konlet wrote:
I didn't know, that's interesting.

This could be an issue with the map file, in the case that your view is trying to display more tiles than the max x and y hold.

Example: If your view is "10x10" but your map is 9x9, issues could arise.

Edited: If I make the map much bigger this stops. If I try to display however it's exact size on view, 10x10 map and "10x10" view this still occurs...
Uh... I can't duplicate that problem. Mine works just fine if the view is larger than the map.

http://files.byondhome.com/Ter13/testbed_src.zip

^Give that a download. If it works on your machine, the problem isn't likely a bug, but rather something else in your project causing trouble.
I downloaded and run and it flickers in my screen :|

https://gyazo.com/2ea4dd2f282fecda6d5cd3cd70d314eb
Alright, so this sounds like a machine-specific bug. Something is going on with your specific hardware/software configuration that's causing this issue.

What version of BYOND are you using, out of curiosity?
Damn, I may be unlucky. Thx for da help tho. It says 509.1319?
https://gyazo.com/12cf65a1aae819bccd1dad35614da543
Actually, my BYOND version is out of date. Lemme check if this happens for me on 1319.