Certain values of world.icon_size caused mouse routines to act as if the cursor was in a different place than it actually was, especially when using text mode.
BYOND Version:468
Operating System:Windows XP Pro
Web Browser:Firefox 3.5.9
Applies to:Dream Seeker
Status: Resolved (470)

This issue has been resolved.
Descriptive Problem Summary:

When using a text-mode map, only the top-left atom displayed is accessible to mouse procedures like MouseDown() or MouseDrag(). Also, hovering your mouse over an object to see its name in the default status bar will only report the name of the object located in the top-left corner of the display.

Numbered Steps to Reproduce Problem:

Create a small map with only turfs, giving each turf a unique name, like its coordinates (ie: "turf (3,5)". Set the map to only display text-mode icons and notice that only the top-left turf is ever accessible to the mouse.

Code Snippet (if applicable) to Reproduce Problem:
maxx = 10
maxy = 10
maxz = 1
icon_size = 15 // anything lower than 16 will produce the bug

for(var/turf/T in world) = "turf ([T.x],[T.y])"


Expected Results:

In text-mode maps, the above code should alert the user to the proper name of the turf they clicked, no matter where on the map they are clicking.

Actual Results:

The above code only alerts the user to the name of the top-left turf, "turf (1,10)", no matter where the user clicks on the map.

Does the problem occur:
Every time? Or how often?

Every time when using text-mode maps and interacting with the mouse.

In other games?

Presumably, though I haven't had a chance to test.

In other user accounts?


On other computers?

Presumably, but I only have this one computer to test. :P

When does the problem NOT occur?

If you switch to a graphical map display, the mouse procedures report the proper name of the turf in the above example code.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit to download old versions for testing.)

I really don't have time to test this out in every version, and I've missed so may updates it would be hard to guess when the problem was introduced.


None if you want to use text-mode map displays, otherwise you can use a graphical display to regain full mouse interaction with the map.
I haven't been able to verify this in 468 with a test project. Switching to text mode still allows me full mouse access. Mouseovers all work, and mouse procs all still work.

Could you provide a demo project you see this happening in, so I can compare apples to apples? It would also be helpful if at some point you could give 467 and older versions a test, which you can do just by downloading the zip and unzipping into another directory like bin467, bin464, etc.
Turns out it only happens if you use the world icon_size variable and set it lower than 16 for the x component. My project was using 4x4 tiles, but the bug shows up with any setting lower than 16 for the x value of the icon_size.

So, icon_size = "16x8" won't show the bug, but icon_size = "15x8" will, as will icon_size = 15. It only seems to be affected by the x component if using a text string.

I tested as far back as 461.1053 with the bug showing up in every version I tested. I'm not sure when icon_size was added, but I suspect the bug was introduced then.

Happy hunting!
Here's a small test project that you can compile to produce the bug: