1
votes

I am trying to create a map application, something like google maps, that shows a portion of a large map and lets you navigate north east up west, zoom in and out, etc...

I encountered a critical problem in the beginning: XNA does not allow importing images larger than a top maximum size limit, even in HiDef mode. And my map image size is much larger than the limit. I was thinking I could split the map (manually, in photoshop) into smaller pieces and paste them one by one in the game, so they will make up a the whole map. Is there a better way to do that?

1

1 Answers

2
votes

Yes. That is a better way of doing it.

If you wanted to get fancy, you could probably do it in a content processor / importer (rather than doing it manually each time the image changed).

This would involve creating a type that contained a collection of your tiles.
You'd then create a new content importer that could take an image file, and split it up into chunks (maybe of configurable size).
It would produce an instance of your newly create type which you could load at runtime.

Check out the Content Pipeline posts on Shawn Hargreaves' blog.