6 Replies - 503 Views - Last Post: 12 June 2012 - 09:20 AM Rate Topic: -----

#1 dodgerid  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-June 09

Is there such a thing as a map splitter ?

Posted 08 June 2012 - 08:54 AM

Hi, not sure if this is the best place for this question, but it relates to what I am trying to achieve, so here it is.

I am creating a game (isometric) and want to use real world maps cut into tiles of my defined size, say 64x32 etc, what I am wondering is, is there a tool anyone knows of that can take a rather large image and cut it into the tiles, obviously I would have to create an editor to add layers for unbuildable areas and water areas etc..

or could somebody offer me the methodology involved in using cut to cut up an image ?

Is This A Good Question/Topic? 0
  • +

Replies To: Is there such a thing as a map splitter ?

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 6468
  • View blog
  • Posts: 23,511
  • Joined: 12-June 08

Re: Is there such a thing as a map splitter ?

Posted 08 June 2012 - 09:03 AM

As in how google did their 8bit maps?

http://gmaps8biteastereggs.tumblr.com/
Was This Post Helpful? 0
  • +
  • -

#3 ButchDean  Icon User is offline

  • Ex-Pro Games Programmer
  • member icon


Reputation: 876
  • View blog
  • Posts: 3,340
  • Joined: 26-November 10

Re: Is there such a thing as a map splitter ?

Posted 08 June 2012 - 09:05 AM

You could write a tool like this yourself.

1. Get the file attributes from the header once loaded into memory.
2. Work out have many bytes need to be traversed in the X and y directions based on the data from the header file retrieved.
3. Write collected data to a series of new files.

How savvy are you with hex editors?
Was This Post Helpful? 0
  • +
  • -

#4 BBeck  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 208
  • View blog
  • Posts: 562
  • Joined: 24-April 12

Re: Is there such a thing as a map splitter ?

Posted 11 June 2012 - 06:21 AM

View Postdodgerid, on 08 June 2012 - 08:54 AM, said:

Hi, not sure if this is the best place for this question, but it relates to what I am trying to achieve, so here it is.

I am creating a game (isometric) and want to use real world maps cut into tiles of my defined size, say 64x32 etc, what I am wondering is, is there a tool anyone knows of that can take a rather large image and cut it into the tiles, obviously I would have to create an editor to add layers for unbuildable areas and water areas etc..

or could somebody offer me the methodology involved in using cut to cut up an image ?


Bump.

I would be interested in know if there's such a tool out there too. I think I did a quick search, not long ago, and came up with nothing. I was wanting to do the same thing, and then I found a program that creates terrains and allows you to split it into multiple maps. It doesn't work as well as I hoped though, and it doesn't allow you to import a map (I don't think). So, probably not really what you're looking for.

Worst case scenario: write your own. The header is the hard part to deal with inside a BMP file. I think you can probably get enough information off the internet to descipher the header, locate the actual data, split it into a specified number of tiles, and recreate new headers and files for all the tiles.

Still, I have to believe someone has addressed this same problem before.
Was This Post Helpful? 0
  • +
  • -

#5 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 928
  • View blog
  • Posts: 3,998
  • Joined: 14-February 08

Re: Is there such a thing as a map splitter ?

Posted 11 June 2012 - 07:46 AM

Enjoy :)

http://www.inversere...maploading.html
Was This Post Helpful? 1
  • +
  • -

#6 BBeck  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 208
  • View blog
  • Posts: 562
  • Joined: 24-April 12

Re: Is there such a thing as a map splitter ?

Posted 11 June 2012 - 07:55 AM

View Poststayscrisp, on 11 June 2012 - 07:46 AM, said:



Thanks! I'll have to go through that when I get some time. It looks like it should be helpful, other than I'm not sure exactly how the data types are defined (how many bytes each is), but I'm sure I can figure it out. I've never actually pulled a bitmap apart before. Sounds like it's less complicated than I imagined.
Was This Post Helpful? 0
  • +
  • -

#7 BBeck  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 208
  • View blog
  • Posts: 562
  • Joined: 24-April 12

Re: Is there such a thing as a map splitter ?

Posted 12 June 2012 - 09:20 AM

I got to thinking about this issue and realized that I think you can easily write a C# app to do this in probably less than an hour.

The following link has an example of using seperate images to form one single skybox image/texture.
http://www.miszalok....box/XNAC6_e.htm

In essense, it's doing the exact opposite of what this thread wants. It's taking individual tiles and combining them into one image. You could instead take one image and seperate it into multiple tiles.

I haven't actually worked through this code and recoding it to output tile files, but I'm thinking this is a head start in the right direction as far as writing a C# app to split a texture or bitmap into multiple files.

I'm just thinking this may be easier than learning the Bitmap file format specification and allow you to get the job done without digging into the details. (Not to mention be a lot faster in getting a working app up and running.)

Even if you're working in C++, you don't necessarily have to have a support tool written in C++. So, I'm thinking this could be pretty useful regardless of what language your game is in.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1