0

i recently downloaded "Tiled Map Editor" - because i heard it was a great tool for making maps. I also got a .tmx "compiler", well, something that made the .tmx usable in XNA.

I've created a map and imported it and it worked fine, but now the tricky part comes...

If i add a collision layer in "Tiled" and adds a tile that indicates block part, how would i get data and values, and how would i be able to use it in XNA? And how would i make so that the player spawns in a certain location, and also, how do i add things as events, and movable objects?

You don't have to tell me everything that, but it would be cool if you could give me an idea on how to get data and values from the .tmx and convert it into rectangles or such things^^

Thanks in advance!

user1306322
  • 8,561
  • 18
  • 61
  • 122
QuackTheDuck
  • 75
  • 1
  • 2
  • 8
  • i guess some parts of game you should write by yourself. XNA have nice intersect function that checks collisions betwen tiles, really easy to use. also XNA is not "game maker" where you just drag 'n' drop with a lot of checkboxes and finished features. if you have problem with collision, please add that piece of code where is bug. – Davor Mlinaric Oct 09 '13 at 09:29
  • I understand, but the question was actually about one thing, and that was how to get data from .tmx and turn them into variables, and as a beginner, i have no idea how to do that :/ – QuackTheDuck Oct 09 '13 at 09:34

1 Answers1

0

I know nothing about tmx file but a little about collision.

I'm going to take a punt that your ".tmx "compiler"" is something that allows files of this type to be included in the content pipeline. Somewhere in this build process will be the vertex data that you can use to construct the collision primitives (shapes) for collision detection later.

ASIDE: it took me ages to get my head around the content pipeline - not for the faint hearted but the way to go. They are samples on the XNA website to get you going

dunxz
  • 288
  • 1
  • 11