Hello Guest

Author Topic: Question  (Read 4478 times)

inmysights

  • Newbie
  • *
  • Posts: 3
    • View Profile
Question
« on: January 04, 2015, 01:13:20 am »
I tried to ask this in the FAQ but it did not have a new topic button.

I was wondering if 2DTK can do this.

If I create a huge 2d map using 32x32 blocks and export that map into a png image, just like the first world in mario bros: http://www.mariomayhem.com/downloads/mario_game_maps/super_mario_bros_maps/SuperMarioBros-World1-Area1.png

I want to be able to import that png into unity and set it up as one huge map and then have each block setup with a collider.

I tried to import that exact png into unity and split it with the unity 2d sprite creator and it was over 27,000 blocks so I could try and and a collider.

right now in Unity if I import the png file, there is no way to set each block with a collider.

There has to be a better way to import huge maps like that Mario one and set the blocks to a collider, creating every single map from scratch just does not seem right to me.

Am I missing something or can your software fix this for me? I hope I explained this issue correctly.

Thank you!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Question
« Reply #1 on: January 04, 2015, 01:02:53 pm »
tk2d isn't built for this, it will successfully import the image as a tilemap and optimise the tiles, removing duplicate tiles in the atlas, and it'll be useful in that regard. Eg. your atlas will fit in a 256x512 image no bother, but internally it still treats these as unique tiles, i.e. collision will have to be set up on individiual tiles in the sprite collection editor.
Unfortunately this is a fringe use case, most people don't want to reuse existing maps, and we dont have any plans to support that.

inmysights

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Question
« Reply #2 on: January 04, 2015, 02:09:36 pm »
so, in Unity, lets just say I did want to remake the entire Super Mario Game, I would have to import every single tile and make every single map from scratch? That is what I am seeing here?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Question
« Reply #3 on: January 04, 2015, 02:15:07 pm »
Yes.
tk2d isn't built for cloning an existing game using a screenshot of the game.

inmysights

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Question
« Reply #4 on: January 04, 2015, 02:50:21 pm »
Thank you! I appreciate you answering my questions.