-1
\$\begingroup\$

I've only recently got into coding and was looking around on how to create a 2D platformer, a lot of tutorials I've seen have used text files to create their maps. However, one I saw in particular spoke of Tiled Map Editor which allows you to create your mape then parse it to pygame.

My question is which is better in the long run? Should I create text file maps with character representing each sprite/player/mob or should I use Tiled to create all my maps then use it's obstacle layer feature to outline where players spawn, wall, boundaries etc?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

My suggestion would be to do both:

  • Start by just following the tutorials and using the text file. This will give you a nice way of getting your head around what's going on in the code, and how you can easily play with the data

  • Once you're comfortable with this, move on to using Tiled (or similar). This is a more advanced tool, which needs to be coded around a little differently. As I remember, it contains multiple layers which you can use to hold all sorts of data, and the format is XML rather than text, so you can hold more information about your map, in a structured format. (e.g. this tile looks like X, and allows player to cross TRUE, and can be shot through TRUE)

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the suggestion I'll do as you said. \$\endgroup\$
    – user140107
    Jun 8, 2020 at 12:44

Not the answer you're looking for? Browse other questions tagged .