ID:140021
 
Code:
turf/mark

var/owner

name = "Dark Mark"
icon = 'marks.dmi'

layer = 2

proc/make_dark_mark(icon,ico_state,cx,cy,xsize,ysize,newname,owner)

set background=1

var/turf/mark/Z
var/xl = 0
var/yl = 0

while(1)
Z = new /turf/mark(locate(cx+xl,cy+yl,usr.z))
Z.icon = icon
Z.owner = owner

Z.icon_state="[ico_state] [xl],[yl]"

Z.name = newname

yl+=1

if(yl>ysize-1)
yl = 0
xl += 1

if(xl<xsize) continue

break


Problem description:

This was originally creating an OBJ, and placing it on the map. This worked but it seemed to cause quite a frame-rate drop in BYOND if the image was large (and what im using this for, the image is very large).

What its doing is painting an image where ever a player is standing (which has many transparent areas) over the current turf on the map. To give an effect like so (this is what its like when its doing it with objects)....



Unfortunatly changing it to turf (to see if it helped performance) resulted in it replacing the empty areas of the image with blackness. I assume its replacing the turf totally, so hence the blackness under the new turf where there is no new image. On the bright side, it did result in no frame-rate hit at all. Mind you it was doing no blending i assume so.....

Anyway, how do you get it to stop doing that? I know the map editor allows you to put turf over another turf. Bit stumped.
The map editor takes all turfs on one spot and adds them to the underlays of the topmost turf I believe.
Use overlays.
In response to Kaioken (#2)
I see, though not really done that before (not on turfs) so will have to see what i can figure out. Especially since i need to get them out again later.