TileSize 32x32
Assuming there is a full screen of objects, would there be any real benefit if the icon data were copied to an another buffer of objects and then copied into the screen list? like an off screen buffer of objects perhaps?
world/maxz=1;
var tmp/bufferData[80]
client/New()
mob=new/mob{}(null);
var i=0;
var atom/movable/obj;
while(i < 80)
obj=new/atom/movable{}()
obj.name = "#[i%40]"
obj.screen_loc="[1+(i&7)],[1+((i>>3)%5)]"
i++
bufferData[i]=obj;
i=0
while(1)
i^=1
screen=bufferData.Copy(i*41,(i^1)*41)
Alter();
sleep(1);
proc/Alter()
var i = (world.time&1);// put an ! @ this line and observe the visual difference.
var tmp = bufferData.Copy(i*41,(i^1)*41)
var gfx = 'dull.dmi'; // black box;
var atom/movable/A
gfx+= rgb(0,rand(240),rand(240));
for(A in tmp)A.icon=gfx;
The above is set up so that the icons are updated while the objects are off screen..or vice versa. *shrug* I observed a slight improvement when doing this, tearing still occurred but a lower frequency. It isn't life threatening obviously, I'd just like to know.
side note: does dream seeker have some sort of hierarchy? Are displayed objects given a 1 up on objects undisplayed? I'm unsure seeing as such an implementation would require constant shuffling of a list.. if someone could answer this question as well, it'd be a real plus.
Regards,
Eloc
It probably doesn't matter whether you:
A) create an object off-screen, change its properties, move it on-screen
or
B) create it on-screen and change its properties
Provided that you don't pause (e.g. call sleep()) between creating the object and changing its properties. If you do, then the object will get sent over the network twice in case B, so you'd prefer case A.
However, if you move an object off-screen, then modify it, then move it back on-screen, that's more expensive than just modifying it in-place. So don't do that.
Not sure what you mean. What kind of hierarchy are you talking about?