XM File Formats

Stop wasting your time reinventing the wheel (badly); write some games instead!

:edit:

…and for the record, PNG images don’t have to be compressed.

Back when I was doing J2ME work for MIDP1 devices a neat way of doing image rotation was to:

  • store the png images uncompressed inside the jar (relying on the jar’s own deflate to keep the file size reasonable)
  • load each into a byte[]
  • rotate the uncompressed pixels in the IDAT chunk in situ (never supported multiple chunks, so image size was constrained)
  • recalculate the CRC
  • then pass the byte[] to the midp1 image loader.

A horrible hack, but useful knowledge as it forced me to become intimately familiar with the excellent PNG format.

This is getting out of hand… Seriously. At first I though OP was just doing practice, but it turns out he is serious about his ‘file format’.

There is no need to replace PNG with uncompressed file format. The file size difference is huge. Your files will go up on average 4 times in size. The whole reason PNG is used is because it is the fastest lossless compression format with good compression ratio that also supports multiple pixel formats. Not to mention that since it has been a standard for many years now it is supported on many platforms and all the tools export / import PNG.

You haven’t invented anything. In fact, you took a step backwards and now you are trying to prove that the correct way to make a wheel is to make it a square. If you are really concerned about PNG decode time, I have a much better proposal for you. Use regular PNG like everybody else. Then, during runtime, after you read your PNG, save it’s uncompressed data in a ‘cache’ of uncompressed images. Next time when you need to load that image, look up the cache and see if there is uncompressed image there and use that. This method would work really well as you don’t need to write importers/exporters anywhere, artists are happy and you are happy since you only need to decompressed each PNG file once.

Then there is the problem of where would you even want to use uncompressed data? PNG decompression on desktop computers is blazingly fast. The only place one would might want uncompressed image data is on mobile devices. The problem is that on those devices disk space is very sparse.

–EDIT
I wrote that compression ratio is 4 on average, but it actually depends on what kind of images you have. It was 4 for a game that I have. The compression ratio could be much smaller or much much bigger depending on the image that you have.

You are conceited.

Check this link out: https://en.wikipedia.org/wiki/Dunning–Kruger_effect

This one is pretty informative too: https://en.wikipedia.org/wiki/Illusory_superiority

This is funny.

It certainly is :slight_smile:

I wouldn’t like to be this guy’s manager :persecutioncomplex:

I defended the wrong side. It seems that Hydroque needs to chill now :confused:

As a side note it is fun to read through the drama.

Let this thread die now.