ID:154698
 
This is just eats up like 5 - 10 MB of memory per second...
world
fps = 30
view = "31x23"
turf = /turf/grass
mob
icon = 'mob.dmi'
turf
icon = 'turf.dmi'
grass
icon_state = "grass"

mob
verb
test()
//var/icon/i = icon('fog.gif')
var/obj/o = new
o.screen_loc = "1,1"
o.icon = icon('fog.gif')
src.client.screen += o
spawn while(src)
sleep(1)
var/icon/i = icon(o.icon)
i.Shift(NORTHWEST,4,1)
o.icon = i


I'm looking for a memory efficient way to do this?
Figured it out (sort of).

If you're curious, this is how you would do it...

mob
verb
testfog()
var/obj/o = new
o.screen_loc = "1,1"
src.client.screen += o
var/image/i = image('fog.gif',o)
i.icon += rgb(0,0,0,100)
var/image/ii = image('fog.gif',o)
ii.icon += rgb(0,0,0,100)
ii.pixel_x = 480

src << i
src << ii

spawn while(src)
sleep(1)
i.pixel_x -= 1
ii.pixel_x -= 1
if(ii.pixel_x <= 0)
i.pixel_x = 0
ii.pixel_x = 480


although i am not sure why byond uses 11 mb to load this 22 kb image... it works
In response to FIREking
Mostly because of the amount of icon operation and configuration you are making BYOND run.

BYOND can't seem to handle a lot of icon alterations via run-time quite successfully.
In response to Mr. Robert
Yeah, I found out its actually making a cache file every time you do something = icon

I hope they give us some non-cache image operations at some point.