Jump to content
  • Advertisement
Sign in to follow this  
Kenny84

Asset Management for tiled rpg

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

Hello, I'm making a smallish rpg and I'm not entirely sure how I should maintain my assets outside of the game.

 

Currently I have about 20 sprites that I'm using, but in the end I imagine I'll have around 200 or so (more if I decide to make it any bigger). So far I've just been hardcoding the properties of the sprites, but I don't think that will be very easy to work with in the long run. My current idea is to store images in directories/subdirectories (based on what it is) and then have a similar structure with json files that describe the properties of everything (id, name, isWalkable, imagePath, ...), but that seems like it might be difficult (or just annoying) to manage as well.

 

I've read around that people have created their own custom tools for asset management, is that something I should look into (or maybe there is a general purpose one)?

 

Any help would be appreciated, I'm just not sure how to go about this.

Share this post


Link to post
Share on other sites
Advertisement

2 thoughts come to mind:

#1, Use a off-the-shelf map editor and tools.  Tiled is a very popular one that comes to mind, both for making maps and handling the assets for you.  When it saves the map, it will save it all to an XML file (I believe), including where the tiles are found.  You can then use another library to load the map and tiles into your game.  Depending on what language/API you're using, you can find many of them that support parsing/loading Tiled files.  Do a google search to find one for your language of choice.

 

#2, Create a custom Map Editor and asset manager.  This would be you doing all the work of Tiled and the Tiled Parser.  This isn't a bad choice if you know what you're doing, and it's a good learning exercise, but it will add much to your development time.  You can handle it so it creates json files that initially has a format for all your assets, then has format for all your maps.

 

God Luck and have fun

Share this post


Link to post
Share on other sites

So some sort of asset manager is the way to go then?

 

I've looked at Tiled, but I wasn't aware it could handle my assets for me, I will look into it more deeply now. Thanks

Share this post


Link to post
Share on other sites

You probably want to arrange tiles and sprites into tilesheets/spritesheets. JSON is a reasonable means of describing the contents of the sheets and the animation cycles, but it could get a bit fiddley if and when you ever need to move things around. You could write a tool to make that easier, and something like Tiled already does this in some form, so you might want to evaluate those.

 

Also bare in mind that your development format need not necessarily be identical or even similar to your deployed format. You typically have different requirements for your game assets on either side of your build process. Its not entirely clear from your question whether you need help with the near-side, the far-side, or both.

Share this post


Link to post
Share on other sites

In my personal projects, I arrange my tiles in spritesheets and then use a json file to describe each tile (position and size in the spritesheet, id, animation frames ecc). It works. I'm also using Tiled as map editor, but ignoring its asset management (it stores the physical path where it finds the asset at editing time, which is not what I want). Tiled assigns each tile an id, which is the same I use in the json file.

 

I wrote my own Tiled parser (not that difficult, 30-40 min of fun). 

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!