ID:1670454
 
Resolved
HUD elements in certain positions caused map to sometimes fail to stretch properly.
BYOND Version:507
Operating System:Windows 7 Pro 64-bit
Web Browser:Firefox 31.0
Applies to:Webclient
Status: Resolved (507.1252)

This issue has been resolved.
Descriptive Problem Summary:
In certain situations, the webclient map won't be resized to fit HUD elements outside of the view (for example a screen_loc of "3,SOUTH-1")

It seems highly dependent on the screen_locs of the HUD objects and the view size. In the one scenario I was able to track down, a HUD object at "3,SOUTH-1" won't appear if a second HUD object is added at "14,1", while the view is "15x13".

Tested in both Firefox and Chrome.

Numbered Steps to Reproduce Problem:
1) Set the world view to "15x13"
2) Add a HUD object to client.screen with a screen_loc of "3,SOUTH-1"
3) Note that the webclient properly resizes the map so that the HUD object is visible
4) Add a second HUD object to client.screen with a screen_loc of "14,1"
5) Note that the webclient is no longer resized to show the first HUD object, and it is now hidden
6) Try various screen_loc and world/view combinations, and the problem comes and goes

Code Snippet (if applicable) to Reproduce Problem:
In this example, click the mob to show/hide the "BadHud" HUD object, which will cause the map to resize and hide/show the other "MissingHud" HUD object.
turf
icon = 'grass.dmi'

obj
MissingHud
icon = 'Screen.dmi'
icon_state = "Left1"
screen_loc = "3,SOUTH-1"
layer = MOB_LAYER+6

BadHud
icon = 'Screen.dmi'
layer = MOB_LAYER+5
screen_loc = "14,1"
//screen_loc = "13,1" // Works fine if this element is moved slightly
icon_state = "BGB"

mob
icon = 'Person.dmi'
var/obj/BadHud/badHud = new()

Login()
client.screen += new/obj/MissingHud
..()

Click()
if(badHud in client.screen)
client.screen -= badHud
else
client.screen += badHud

world
maxx = 50
maxy = 50
maxz = 1
view = "15x13"
//view = "21x21" // Works fine with a larger view


Screenshot with BadHud not on screen, and MissingHud visible:
http://files.byondhome.com/DarkCampainger/ WebclientHudBugA.png

Screenshot with BadHud on screen, and MissingHud... missing:
http://files.byondhome.com/DarkCampainger/ WebclientHudBugB.png


Expected Results:
Map should resize to fit all HUD objects outside of the view

Actual Results:
In certain scenarios, the map does not resize to fit HUD objects outside the view and they are hidden.

Does the problem occur:
Every time? Or how often? Every time with this particular combination
In other games? Originally noticed with my ancient Cosmic Peril game
In other user accounts? On administrator account
On other computers? Unknown

When does the problem NOT occur?
When a HUD object is not added near the right-edge of the view

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.)
It does not occur in the latest version of Dream Seeker, just the Webclient.

Workarounds:
Redesign HUD and view until you find a combination that works? Heh.
Lummox JR resolved issue with message:
HUD elements in certain positions caused map to sometimes fail to stretch properly.