Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Pseudo-Loader for TMX Files

Author
Message
anwserman
12
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 11th Aug 2013 12:15 Edited at: 11th Aug 2013 12:23
Hey everyone,
I created my own variant for loading TMX files... well, it's a cheater way of doing it. This code parses maps in the Flare TXT format, supported by Tiled.

This format has a couple limitations, specifically that you cannot assign specific custom properties to any tile or map layer. However, you can assign custom properties to the map itself.

This loader also works only with non-isometric maps. But hey, works for what I needed it to be Included are two maps included with Phaelax's amazing loader, which was the inspiration for using mine. However, my loader cut's the time for loading the Overworld map from Zelda by 75%

To simply use this loader, save and keep your map as an orthogonal TMX map. When you're ready to load it into your game, save it as a Flare text file.

NOTE: I did not include any code for parsing Object layers, or collision. This should be easy to do (since I have commented everything and added base code to be filled in when parsing the map) but could also be very game specific.

EDIT: I need to work on layering sprites, but that'll come in an update soon. Or I'll post how I do it later

Hi there. My name is Dug. I have just met you, and I love you.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-27 08:04:56
Your offset time is: 2024-04-27 08:04:56