ID:2164840
 
Resolved
Drawing too many icons (over 32K) on the same tile caused all of them not to render. Please note: There is still an absolute limit of 64K icons for an entire map.
BYOND Version:510
Operating System:Windows 10 Pro 64-bit
Web Browser:Firefox 49.0
Applies to:Dream Seeker
Status: Resolved (511.1367)

This issue has been resolved.
Descriptive Problem Summary:
I have recently done some tests involving image objects to see how many can be added without performance. It does seem to slow down a bit (but nothing compared to objects on the screen). Even though, image lists have a 24-bit limit; it is not apparently the case in terms of actually rendering it. Instead, the rendering still hits a 16-bit limit (signed in fact) of 32,767. Higoten just recently brought my attention about the increased limit. That's the reason for the bug report.

Numbered Steps to Reproduce Problem:
No need here, I have a test environment right here: https://dl.dropboxusercontent.com/u/24250760/BYOND/ Test%20Versions/Next%20Generation%20Rendering%20Environment. zip

Code Snippet (if applicable) to Reproduce Problem:
world
maxx = 11
maxy = 11
maxz = 1
fps = 20

var
MasterDisplayControl/MDC = new()

MasterDisplayControl
parent_type = /obj
screen_loc = "CENTER"

Pixel
var
image/P
client/C
New(client/C)
src.C = C
src.P = image('Pixel.dmi', MDC)
C << src.P
proc
Move(x, y)
P.pixel_x = x
P.pixel_y = y


client
var
list
display = new()
New()
..()
screen += MDC
for(var/MX = 3 * -32; MX <= 3 * 32; MX++)
for(var/MY = 3 * -32; MY <= 3 * 32; MY++)
var/Pixel/P = new(src, null)
P.Move(MX, MY)
display += P
world << length(display)
sleep(world.tick_lag)


Expected Results:
Continues to render, even if it slows down.

Actual Results:
Stops rendering properly after hitting the 32,767 limit.

Does the problem occur:
Every time? Or how often? Happens only if you draw above that limit.
In other games? None to my knowledge unless they draw a crazy number of images.
In other user accounts? N/A
On other computers? N/A

When does the problem NOT occur? Does not occur if you draw far below the 16-bit signed limit.

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

Workarounds:
Only workaround is to avoid hitting the limit (through an image counter).
I finally got a chance to look at your test environment, but it's actually useless. I can't use a .dmb and .rsc for testing; I need source.
In response to Lummox JR
Sure thing. Though I changed the code since; Test (first one) verb is now the one to activate the image rendering test. The grass you see is also an image, which will disappear.

Link: https://dl.dropboxusercontent.com/u/24250760/BYOND/ Test%20Versions/Next%20Generation%20Rendering%20Environment_ src.zip

This is very bizarre. Even though the Webclient is affected by another bug where image objects will stay in one corner, it will still render after reaching over the same limit the Dream Seeker suffers.

Edit: I have a feeling Dream Seeker is hitting a texture limit somewhere.
Shoot, I don't remember if I got back to this. I'll take another look.

Do you have a demo for the webclient thing? That should get a separate bug report.
Here's the separate bug report made almost the same time as this bug report: http://www.byond.com/forum/?post=2168530

In fact, you can actually use the same demo I posted earlier on here to test it as it uses image pixel offsets.
Lummox JR resolved issue with message:
Drawing too many icons (over 32K) on the same tile caused all of them not to render. Please note: There is still an absolute limit of 64K icons for an entire map.