Skip to main content
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Source Link

The easiest way to parse TMX files with Java is to use the libtiled library. It is licensed under 2-clause BSD, which means you can use it for anything as long as you give creditgive credit.

But if you would like to implement it yourself: The .tmx format is an XML-based format. That means you can parse the files with an XML parser. There are several options for this in Java. Which one you use depends on personal taste.

Depending on how you saved the TMX file, the actual layer data will be either encoded in a stream of ascii-decimal encoded integers separated by commas (aka. CSV) or a stream of int's encoded with base64. The layer data can also be compressed with gzip or zlib. You might want to disable that in the Tiled settings for now because it just makes things more complicated. When your finished game turns out too big, you can achieve even better compression by putting all of your assets in a zip archive.

You might also want to take a look at the other export formats Tiled supports. In one project I found it much easier to use the JSON format. That was because the project was using JSON for other things so I already had a good JSON library and some useful utility functions.

The easiest way to parse TMX files with Java is to use the libtiled library. It is licensed under 2-clause BSD, which means you can use it for anything as long as you give credit.

But if you would like to implement it yourself: The .tmx format is an XML-based format. That means you can parse the files with an XML parser. There are several options for this in Java. Which one you use depends on personal taste.

Depending on how you saved the TMX file, the actual layer data will be either encoded in a stream of ascii-decimal encoded integers separated by commas (aka. CSV) or a stream of int's encoded with base64. The layer data can also be compressed with gzip or zlib. You might want to disable that in the Tiled settings for now because it just makes things more complicated. When your finished game turns out too big, you can achieve even better compression by putting all of your assets in a zip archive.

You might also want to take a look at the other export formats Tiled supports. In one project I found it much easier to use the JSON format. That was because the project was using JSON for other things so I already had a good JSON library and some useful utility functions.

The easiest way to parse TMX files with Java is to use the libtiled library. It is licensed under 2-clause BSD, which means you can use it for anything as long as you give credit.

But if you would like to implement it yourself: The .tmx format is an XML-based format. That means you can parse the files with an XML parser. There are several options for this in Java. Which one you use depends on personal taste.

Depending on how you saved the TMX file, the actual layer data will be either encoded in a stream of ascii-decimal encoded integers separated by commas (aka. CSV) or a stream of int's encoded with base64. The layer data can also be compressed with gzip or zlib. You might want to disable that in the Tiled settings for now because it just makes things more complicated. When your finished game turns out too big, you can achieve even better compression by putting all of your assets in a zip archive.

You might also want to take a look at the other export formats Tiled supports. In one project I found it much easier to use the JSON format. That was because the project was using JSON for other things so I already had a good JSON library and some useful utility functions.

added 14 characters in body
Source Link
Philipp
  • 121.5k
  • 28
  • 261
  • 342

The easiest way to parse TMX files with Java is to use the libtiled library. It is licensed under 2-clause BSD, which means you can use it for anything as long as you give credit.

But if you would like to implement it yourself: The .tmx format is an XML-based format. That means you can parse the files with an XML parser. There are several options for this in Java. Which one you use depends on personal taste.

Depending on how you saved the TMX file, the actual layer data will be either encoded in a stream of ascii-decimal encoded integers separated by commas (aka. CSV) or a stream of int's encoded with base64. The layer data can also be compressed, but you with gzip or zlib. You might want to disable that in the Tiled settings for now because it just makes things more complicated. When your finished game turns out too big, you can achieve even better compression by putting all of your assets in a zip archive.

You might also want to take a look at the other export formats Tiled supports. In one project I found it much easier to use the JSON format. That was because the project was using JSON for other things so I already had a good JSON library and some useful utility functions.

The easiest way to parse TMX files with Java is to use the libtiled library. It is licensed under 2-clause BSD, which means you can use it for anything as long as you give credit.

But if you would like to implement it yourself: The .tmx format is an XML-based format. That means you can parse the files with an XML parser. There are several options for this in Java. Which one you use depends on personal taste.

Depending on how you saved the TMX file, the actual layer data will be either encoded in a stream of ascii-decimal encoded integers separated by commas (aka. CSV) or a stream of int's encoded with base64. The layer data can also be compressed, but you might want to disable that in the Tiled settings for now because it just makes things more complicated. When your finished game turns out too big, you can achieve even better compression by putting all of your assets in a zip archive.

You might also want to take a look at the other export formats Tiled supports. In one project I found it much easier to use the JSON format. That was because the project was using JSON for other things so I already had a good JSON library and some useful utility functions.

The easiest way to parse TMX files with Java is to use the libtiled library. It is licensed under 2-clause BSD, which means you can use it for anything as long as you give credit.

But if you would like to implement it yourself: The .tmx format is an XML-based format. That means you can parse the files with an XML parser. There are several options for this in Java. Which one you use depends on personal taste.

Depending on how you saved the TMX file, the actual layer data will be either encoded in a stream of ascii-decimal encoded integers separated by commas (aka. CSV) or a stream of int's encoded with base64. The layer data can also be compressed with gzip or zlib. You might want to disable that in the Tiled settings for now because it just makes things more complicated. When your finished game turns out too big, you can achieve even better compression by putting all of your assets in a zip archive.

You might also want to take a look at the other export formats Tiled supports. In one project I found it much easier to use the JSON format. That was because the project was using JSON for other things so I already had a good JSON library and some useful utility functions.

added 103 characters in body
Source Link
Philipp
  • 121.5k
  • 28
  • 261
  • 342

The easiest way to parse TMX files with Java is to use the libtiled library. It is licensed under 2-clause BSD, which means you can use it for anything as long as you give credit.

But if you would like to implement it yourself: The .tmx format is an XML-based format. That means you can parse the files with an XML parser. There are several options for this in Java. Which one you use depends on personal taste.

Depending on how you saved the TMX file, the actual layer data will be either encoded in a stream of ascii-decimal encoded integers separated by commas (aka. CSV) or a stream of int's encoded with base64. The layer data can also be compressed, but you might want to disable that in the Tiled settings for now because it just makes things more complicated. When your finished game turns out too big, you can achieve even better compression by putting all of your assets in a zip archive.

You might also want to take a look at the other export formats Tiled supports. In one project I found it much easier to use the JSON format. That was because the project was using JSON for other things so I already had a good JSON library and some useful utility functions.

The easiest way to parse TMX files with Java is to use the libtiled library.

But if you would like to implement it yourself: The .tmx format is an XML-based format. That means you can parse the files with an XML parser. There are several options for this in Java. Which one you use depends on personal taste.

You might also want to take a look at the other export formats Tiled supports. In one project I found it much easier to use the JSON format. That was because the project was using JSON for other things so I already had a good JSON library and some useful utility functions.

The easiest way to parse TMX files with Java is to use the libtiled library. It is licensed under 2-clause BSD, which means you can use it for anything as long as you give credit.

But if you would like to implement it yourself: The .tmx format is an XML-based format. That means you can parse the files with an XML parser. There are several options for this in Java. Which one you use depends on personal taste.

Depending on how you saved the TMX file, the actual layer data will be either encoded in a stream of ascii-decimal encoded integers separated by commas (aka. CSV) or a stream of int's encoded with base64. The layer data can also be compressed, but you might want to disable that in the Tiled settings for now because it just makes things more complicated. When your finished game turns out too big, you can achieve even better compression by putting all of your assets in a zip archive.

You might also want to take a look at the other export formats Tiled supports. In one project I found it much easier to use the JSON format. That was because the project was using JSON for other things so I already had a good JSON library and some useful utility functions.

added 645 characters in body
Source Link
Philipp
  • 121.5k
  • 28
  • 261
  • 342
Loading
added 645 characters in body
Source Link
Philipp
  • 121.5k
  • 28
  • 261
  • 342
Loading
Source Link
Philipp
  • 121.5k
  • 28
  • 261
  • 342
Loading