ID:1756235
 
BYOND Version:507
Operating System:Windows 8 64-bit
Web Browser:Chrome 37.0.2062.120
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
The main problem is that map text has some rendering issues for me.

Using the graphics hardware for displaying maps does not render things in a crisp manner.

Normal size:


Enlarged size:


Using the software for rendering makes everything look perfect. However, when enlarging the screen it appears to slow the game "a lot".

Normal size:


Enlarged size:



Numbered Steps to Reproduce Problem:

Code Snippet (if applicable) to Reproduce Problem:
mob/Login()
var/obj/O = new
O.maptext = "Hello world! This is just an example of a long text that will have some funny looking letters somewhere inside of it, which is very unattractive."
O.screen_loc = "CENTER"
src.client.screen += O


Expected Results:
Text that doesn't have rendering errors. Which is given with software mode. But restricts me from rendering big screens.

Actual Results:
Text that seems to smush themselves.

Does the problem occur:
Every time? Or how often? Every. Time. This also happens to icons at times. Once I thought one of my icons, the blue monster, had a blinking animation because of this. I was surprised because I thought I didn't add that in yet. I was right, I didn't. The rendering did it for me. But that's beside the point. Maptext shouldn't have blinking eyes lol.
In other games? Not tested.
In other user accounts? Not tested, but I'm sure this doesn't matter.
On other computers? Not tested.

When does the problem NOT occur?
When using Software Rendering.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.) N/A

Workarounds:
Use icons to display text (which can be resource intensive in the long run).
I'm not sure this is really a bug. Whether the map is scaled down via bilinear scaling or nearest-neighbor is something that DirectX offers no control over. (This is likewise the reason why we offer no option for this choice when upscaling.) A different video card will behave differently.

Bear in mind, huge maps are going to be taxing to render regardless. They're not going to be kind to either end for the webclient, either.
The map is scaled so close to 1x that nearest-neighbor scaling causes seemingly random rows and columns of pixels to be removed.

If the map was actually at 1x scale, I think text would definitely render properly. I have a feeling Xirre tried to make the map stay at 1x regardless of window size, but the actual scale isn't 1x for whatever reason.
Resizes the screen whenever the window's size changes.
mob
var
mapSize // Used for ResizeMap() to tell the previous mapSize.

proc
dd_text2List(t,t2)
var/spot = findtext(t,t2)
if(spot)
return list(copytext(t,1,spot), copytext(t,spot+1,length(t)+1))

attackable
player
verb

// Resizes the client's view size as the map size changes.
ResizeMap()
set hidden = 1
var/sizeFactor = 1
if(mapSize != winget(src, "Game.map", "size"))
mapSize = winget(src, "Game.map", "size")
var list/dimensions = dd_text2List(mapSize, "x")
var nx = text2num(dimensions[1]), ny = text2num(dimensions[2])
client.view = "[round(nx / world.icon_size/sizeFactor)+1]x[round(ny / world.icon_size/sizeFactor)+1]"
In response to Xirre
The rounded values will usually differ from the actual values. You still need the map to have zoom=1 or icon-size=32 (or whatever).

edit: icon-size, not icon_size
In response to Kaiochao
Kaiochao wrote:
The rounded values will usually differ from the actual values. You still need the map to have zoom=1 or icon_size=32 (or whatever).

What is zoom? world.icon_size equals 32.
In response to Xirre
"zoom" and "icon-size" are skin parameters of the map control. They're separate from world.icon_size, which is a world variable.
That solved the issue. Thank you.