2D Toolkit Forum

2D Toolkit => Support => Topic started by: fsadeq on May 22, 2012, 03:58:16 pm

Title: Any ideas on how to capture a screenshot of a tilemap?
Post by: fsadeq on May 22, 2012, 03:58:16 pm
Kind of unrelated to 2DToolkit, but I'm trying to capture a large image of an entire tilemap, like how old school games would have layouts of the entire level in magazines. Does anyone have any ideas of how I can do this short of taking a ton of screenshots of different parts and stitching them together? Thanks.
Title: Re: Any ideas on how to capture a screenshot of a tilemap?
Post by: MetalGreg on May 22, 2012, 04:18:44 pm
Haven't tried it yet but using this you should be able to achieve what you want.
Title: Re: Any ideas on how to capture a screenshot of a tilemap?
Post by: fsadeq on May 22, 2012, 04:20:47 pm
Thanks for your reply, but I think you forgot to link to whatever you're talking about  ;)
Title: Re: Any ideas on how to capture a screenshot of a tilemap?
Post by: MetalGreg on May 22, 2012, 04:38:23 pm
http://www.unifycommunity.com/wiki/index.php?title=TakeScreenshot
Title: Re: Any ideas on how to capture a screenshot of a tilemap?
Post by: unikronsoftware on May 22, 2012, 04:58:23 pm
Another way to do this is to create a camera, render to texture (make sure the camera has aspect of 1 and is a "nice" resolution like 512x512) and then move the camera to cover the playable area in increments of the camera size. While you're doing this save a screenshot using the same code in that script MetalGreg posted. You'd have to stitch it back together in the end though, but you can do this in your favorite image editor.

Another way you could do this is to create a downsampled tilemap spritecollection, swap the spritecollection and that'll resize the tilemap to be tiny (eg. replace each 32x32 tile with a 4x4 simplified one). This will give you full control over each tile which could be a lot better than the previous suggestion. You can simply drag the original sprite collection back in after youre done with this.
Title: Re: Any ideas on how to capture a screenshot of a tilemap?
Post by: fsadeq on May 23, 2012, 03:39:31 pm
Thanks, I modified that script so that it automatically moves the camera across the whole scene, and takes a snapshot of each position. I can then easily merge these in Photoshop.