Advertisement

Adding objects via Tiled Editor or programatically

Started by October 09, 2013 08:18 PM
5 comments, last by latch 11 years, 4 months ago

I'm working on a 2d rpg in Java using LibGdx and am adding in game objects (Nodes for mining at the moment), and I'm not sure how I should add them? Should I use an xml file and load them in that way? Or should I use the object feature in the Tiled map editor?

What would be the pros/cons of each?

You can probably pretty much do what's the easiest.

I don't think there are any real, apparent "pros" or "cons".
Advertisement

...removed reply to a hidden response from here -- view the post history (from the lower right of the post) if you're curious...

As for the original question, I'm not familiar enough with the Tiled map editor to give a reasonable answer. You will need something to create your data, and Tiled looks like a reasonable map editor. If you choose to use that map editor, you'll need some way to load the data. If you chose something else for your map editor, you'll need a different way to load the data.

Either way, you will need something to load the data, and something to create and modify the data. I have no idea if using Tiled would be a good route or a bad route for you, so I'll leave that to people with more experience on it.

Advertisement

Do it via level/tile editor. Its much more easier and versatile. I use Mappy and it gives me a visual since of how my levels should look like. After you design your level, all you have to do is call a command and it loads it in pixel perfect. If hard code it in, it gets really ugly. You make a really huge multidimensional array and load in the tile values, hoping you didn't misplace a value. Just go with the editor, its a time saver

Moderation note:

I've hidden a number of off-topic posts discussing the reputation system in order to keep the discussion on-topic. Please stay on topic from this point forwards.

- Jason Astle-Adams

I'd vote for tiled editor. It may require more effort, but it is often easier to visualize something that you can see. It also allows you to more easily convert between sketches of the layout and the actual level format. I've never seen the tile editor you are considering using, but I believe that in practice, they often have numerous benefits in rapidly producing coherent files, rather than maybe doodling a grid on a napkin, converting it to co-ordinates, typing it out in an XML file, then running the game, and realizing that you placed something too close to something else, or where you placed the object interferes with its ability to carry out its task.

TL;DR: When in doubt, I'd choose the thing that most closely resembles the actual game.

This topic is closed to new replies.

Advertisement