|
Greemax
|
 |
« on: August 18, 2012, 06:06:39 AM » |
|
Hey I'm working on a practice project in Visual C++ with SFML. I've already made a very simple map editor, but for a bigger project I would like to use Tiled Map Editor. How can I use it with C++ throught tinyxml and zlib? Can anyone give me a tutorial for this or explain how can I do it please? Ty 
|
|
|
|
|
Logged
|
|
|
|
|
rivon
|
 |
« Reply #1 on: August 18, 2012, 06:28:41 AM » |
|
If you wouldn't mind using pugixml instead of tinyxml, I could provide you my loading code. Or you could just rewrite the XML parts to use tinyxml.
|
|
|
|
|
Logged
|
|
|
|
|
Greemax
|
 |
« Reply #2 on: August 18, 2012, 06:34:38 AM » |
|
As long as ot works, I don't mind to use pugixml. It would be awesome if you could share your loading code. 
|
|
|
|
|
Logged
|
|
|
|
|
rivon
|
 |
« Reply #3 on: August 18, 2012, 07:55:51 AM » |
|
PM with code sent.
|
|
|
|
|
Logged
|
|
|
|
|
Greemax
|
 |
« Reply #4 on: August 18, 2012, 08:01:47 AM » |
|
Ty, u where very helpful
|
|
|
|
|
Logged
|
|
|
|
|
kamac
|
 |
« Reply #5 on: August 18, 2012, 10:44:15 AM » |
|
By the way, for bigger projects you'd be best with making your own editor. (As long as you need non-standard things, like traps / enemies / NPCs / whatever)
|
|
|
|
|
Logged
|
|
|
|
|
Greemax
|
 |
« Reply #6 on: August 18, 2012, 01:49:51 PM » |
|
I wasn't so sure about that but I already thought about it, thanks for warning.
|
|
|
|
|
Logged
|
|
|
|
|
DanFessler
|
 |
« Reply #7 on: August 18, 2012, 01:59:43 PM » |
|
I'm a huge fan of Tiled because it can plug into nearly any game engine due to it's flexibility with arbitrary properties and values you can assign to pretty much anything. There isn't much it *can't* do when it comes to 2d tile games. I always encourage people to use it until they absolutely can't use it any more and need custom features - but even then, it's open source and you can modify it. You'll likely waste FAR more time making your own editor than making tiled work for you.
|
|
|
|
|
Logged
|
|
|
|
|
kamac
|
 |
« Reply #8 on: August 18, 2012, 11:24:19 PM » |
|
As long as you need off the grid alignment and on grid alignment. I believe customising Tiled to work this way could be pretty tough. Also, it's not that easy to modify when somebody doesn't know C++.
There are probably many reasons you should use tiled, but there is equally many reasons you shouldn't.
|
|
|
|
|
Logged
|
|
|
|
|
PompiPompi
|
 |
« Reply #9 on: August 18, 2012, 11:27:34 PM » |
|
You can save the actual tile map data as comma spereated inside your xml file. There are such options in Tiled. You really don't have to save it compressed and unzip it.
|
|
|
|
|
Logged
|
 Kickstarter? no no no... it's Kicksucker...
|
|
|
|
verticalvertex
|
 |
« Reply #10 on: August 18, 2012, 11:53:34 PM » |
|
If you need custom a export format it is very easy to write your own plugins.
|
|
|
|
|
Logged
|
|
|
|
|
kamac
|
 |
« Reply #11 on: August 18, 2012, 11:58:27 PM » |
|
I'm not sure. Instead of walking in the mud (I mean browsing through somebody's else code), I would yet prefer writing my own editor from scratch and would know where's what.
|
|
|
|
|
Logged
|
|
|
|
|
Greemax
|
 |
« Reply #12 on: August 19, 2012, 03:46:23 AM » |
|
I know nothing about xml and I'm not a C++ pro,I'm going to try to use Tiled first and one day I'll try to write my own editor when I can.
|
|
|
|
|
Logged
|
|
|
|
|
DanFessler
|
 |
« Reply #13 on: August 23, 2012, 02:11:09 PM » |
|
As long as you need off the grid alignment and on grid alignment. I believe customising Tiled to work this way could be pretty tough. Also, it's not that easy to modify when somebody doesn't know C++.
There are probably many reasons you should use tiled, but there is equally many reasons you shouldn't.
That's an out of the box feature of Tiled.
|
|
|
|
|
Logged
|
|
|
|
|