Jump to content
  • Advertisement
Sign in to follow this  
stein102

Adding objects via Tiled Editor or programatically

This topic is 2108 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
You can probably pretty much do what's the easiest.

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

Share this post


Link to post
Share on other sites

...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.

Edited by jbadams
Removed a response to a post that has been hidden.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Edited by Ectara

Share this post


Link to post
Share on other sites

I just wrote a tiled level editor for this game I'm writing because I was designing levels in Notepad before.

 

leveleditorimg.png

 

It's WAY easier now. I can add ten toilets in blink with a sweep of the mouse!

Edited by latch

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!