ID:1464355
 
A utility for getting a screenshot of the map at run-time.

Map Size: 250x250 tiles

1 pixel per tile.
-Size: 576 bytes
-Dimensions: 250x250 pixels
-Link: http://files.byondhome.com/Kozuma3/1.png

2 pixels per tile.
-Size: 1.86 KB
-Dimensions: 500x500 pixels
-Link: http://files.byondhome.com/Kozuma3/2.png

4 pixels per tile.
-Size: 5.69 KB
-Dimensions: 1000x1000 pixels
-Link: http://files.byondhome.com/Kozuma3/4.png

8 pixels per tile.
-Size: 16.2 KB
-Dimensions: 2000x2000 pixels
-Link: http://files.byondhome.com/Kozuma3/8.png

16 pixels per tile.
-Size: 566 KB
-Dimensions: 4000x4000 pixels
-Link: http://files.byondhome.com/Kozuma3/16.png

32 pixles per tile.
-Size: 767 KB
-Dimensions: 3520x3168 pixels
-Link: http://files.byondhome.com/Kozuma3/Pie.png
amazin'
I ain't even mad. I just got my own system working today, but it is in no way dynamic. I generated 16 100x100 blocks for a 400x400 map and put them together really quick in PS. The hard part was the positioning of it at runtime. lol
In response to Albro1
Albro1 wrote:
I ain't even mad. I just got my own system working today, but it is in no way dynamic. I generated 16 100x100 blocks for a 400x400 map and put them together really quick in PS. The hard part was the positioning of it at runtime. lol

Great job :D
How does this handle maps with multiple Z levels?
In response to Magicmann
Magicmann wrote:
How does this handle maps with multiple Z levels?

GetMapImage(size=16,z_level=1)

Size being the amount of pixels per "tile".
Z_level being the z level being copied.
Now, we just need a system that actively logs the kovements and actions of every player so that we can create films based on BYOND games, even though that is highly unncessary.
...hmmm, will you be releasing this utility at some point? or is this just letting people see what you were able to accomplish? :O
In response to Turboskill
Turboskill wrote:
...hmmm, will you be releasing this utility at some point? or is this just letting people see what you were able to accomplish? :O

I've remade it to allow the creation of a 250x250 map with 16 pixels per tile within 5 to 6 seconds. Less than a second for a 1 pixel per tile image.

It isn't pretty and needs fixed up with overlays with pixel offsets but I haven't really done anything with it since I got it to work on a plain map, I'll mess around with it more and fix it up ^^.

[Edit] I'll post it when I fix it up abit ^^.

250x250 Map at 16 pixels per tile.
                     Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
------------------ --------- --------- --------- ---------
/mob/verb/Test 0.000 5.715 5.716 1
/proc/GetMapImage 0.401 3.492 3.492 1
/icon/New 2.302 2.302 2.302 22
/icon/proc/Blend 0.779 0.792 0.798 63323
/icon/proc/Icon 0.010 0.012 0.016 63323
/icon/proc/Crop 0.000 0.000 0.000 1
/icon/proc/Scale 0.000 0.000 0.000 21
Here is another game but with 32 pixels per tile.

For a better view --> http://files.byondhome.com/Kozuma3/Pie.png

In response to Kozuma3
Kozuma3 wrote:
Here is another game but with 32 pixels per tile.

For a better view --> http://files.byondhome.com/Kozuma3/Pie.png

That's pretty great. How long did that take to generate?
In response to Magicmann
Magicmann wrote:
Kozuma3 wrote:
Here is another game but with 32 pixels per tile.

For a better view --> http://files.byondhome.com/Kozuma3/Pie.png

That's pretty great. How long did that take to generate?

1x1 - 0.56 seconds.
2x2 - 0.57 seconds.
4x4 - 0.64 seconds.
8x8 - 1.97 seconds.
16x16 - 5.5 seconds.
32x32 - 18.7 seconds.
Don't mind me, just posting so my pager updates me when you update this topic.
In response to Unwanted4Murder
You can receive updates from a topic by simply clicking the [Follow] button at the very bottom (between the last post and the Reply to post box).
Thanks for the tip. :) I knew about that, but for some reason thought it was a member-only feature.
inb4 /necro/

Posting the code, now that I remember :B

[Edit] Just noticed this is an older one, I have to many projects *-* The more updated one uses a list that stores already created icons and places them without recreating them. :C

proc
GetMapImage(zlevel=1,size=1)
var x_size = size * world.maxx
var y_size = size * world.maxy
while(x_size>4096){size=round(size/2);x_size = size * world.maxx}
while(y_size>4096){size=round(size/2);y_size = size * world.maxy}
var/icon/img = new('A.dmi')
img.Crop(1,1,world.maxx*size,world.maxy*size)
. = 0
for(var/Y=1 to world.maxy)
for(var/X=1 to world.maxx)
var
turf/T = locate(X,Y,zlevel)
icon/A = new(T.icon,T.icon_state,T.dir,1)
A.Scale(1*size,1*size)
img.Blend(A,ICON_OVERLAY,X*size,Y*size)
for(var/obj/O in T.contents)
var/icon/B = new(O.icon,O.icon_state,O.dir,1)
B.Scale(1*size,1*size)
img.Blend(B,ICON_OVERLAY,X*size,Y*size)
.++
return img

mob/verb/Test(n as num,zz as num)
src<<ftp(GetMapImage(zlevel=zz,size=n),"Pie.png")
SHUTUP AND TAKE MY MONEY!
proc
GetMapImage(zlevel=1,size=1)
var x_size = size * world.maxx
var y_size = size * world.maxy
while(x_size>4096){size--;x_size = size * world.maxx}
while(y_size>4096){size--;y_size = size * world.maxy}
var/icon/img = new('A.dmi'),list/Tiles = list()
img.Crop(1,1,world.maxx*size,world.maxy*size)
world<<"[world.maxx]x[world.maxy]"
for(var/Y=1 to world.maxy)
for(var/X=1 to world.maxx)
var/turf/T = locate(X,Y,zlevel)
if(!Tiles.Find("[T.icon][T.icon_state]"))
var/icon/A = new(T.icon,T.icon_state,T.dir,1)
A.Scale(size,size)
img.Blend(A,ICON_OVERLAY,X*size,Y*size)
Tiles["[T.icon][T.icon_state]"] += A
else img.Blend(Tiles["[T.icon][T.icon_state]"],ICON_OVERLAY,X*size,Y*size)
for(var/obj/O in T.contents)
if(!Tiles.Find("[O.icon][O.icon_state]"))
var/icon/B = new(O.icon,O.icon_state,O.dir,1)
B.Scale(size,size)
img.Blend(B,ICON_OVERLAY,X*size,Y*size)
Tiles["[O.icon][O.icon_state]"] += B
else img.Blend(Tiles["[O.icon][O.icon_state]"],ICON_OVERLAY,X*size,Y*size)
return img

mob/verb/Test(n as num)
src<<ftp(GetMapImage(zlevel=1,size=n),"Pie.png")