obj/png
New()
var/icon/i = icon('test-png.png')
for(var/turf/t in world)
i.DrawBox(t.minimapColor,t.x,t.y)
icon = i
//sleep()
..()
mob/verb/test()
var/obj/png/o = new
src << o.icon
turf/var/minimapColor
turf/grass
icon = 'grass.dmi'
New()
minimapColor = rgb( 0 , rand(125,220) , 0 )
turf/water
icon = 'water.dmi'
density = 1
New()
minimapColor = rgb( 0 , 0 , rand(175,220) )
turf/mountain
icon = 'rock.dmi'
density = 1
New()
minimapColor = rgb( rand(100,150) , rand(53,100) , 0 )
test-png.png is a 100x100 pixel png file.
The procedure checks for all turfs on the map and Draws pixels on a file according to their co-ordinates, giving the final product a minimap kind of look.
They all have random minimap colors so it looks quite good. I just can't get around the amount of time it takes to make, or the resources it uses. Isn't there any way to make this procedure more efficient and faster?
The way you have it now, for every turf the /icon object will be converted to an icon file, every iteration, which will cause much extra overhead, of course.