Hello Guest

Author Topic: Any ideas on how to capture a screenshot of a tilemap?  (Read 6915 times)

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Any ideas on how to capture a screenshot of a tilemap?
« 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.

MetalGreg

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Any ideas on how to capture a screenshot of a tilemap?
« Reply #1 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.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Any ideas on how to capture a screenshot of a tilemap?
« Reply #2 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  ;)


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Any ideas on how to capture a screenshot of a tilemap?
« Reply #4 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.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Any ideas on how to capture a screenshot of a tilemap?
« Reply #5 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.