Following this post at Ned Batchelder blog, I've been playing with Spore Creature Creator, the new game by Will Wright, which apart from Sid Meier, is my favorite game desginer (actually, those are the only two game designers I know by name).
I won't write about the game itself, it suffice to say that from the computer science point of view, it's already marvelous, and from the biology point of view, it could be better. I would like to write a bit about how creatures are saved.
It turns out that spore saves its creators in plain .png files. Here's an example (WayneRTron):

If you open those file with any regular image viewer, you'll just see a picture of the creature. However, if you drag those images into Spore Creature Creator, the 3d model of the creature would open up.
It is still a mystery how Spore is able to do that. One thing is almost sure - the creature model is coded in the LSBs of each pixel in the image. You can see it by taking only those pictures which are fully transparent (the white background around the creature above). You'll notice then that only the LSBs of those pixels are changing. This shows that indeed something is hiding in the LSBs (why would they otherwise change if the pixels are transparent?), and that there's nothing coded in the other bits.
Not convinced yet? Take a look at the following picture.
Don't worry if you don't see anything. I promise you there is indeed a picture in the center of the blank lines above (try right clicking around). The deal is that all of its pixels are either fully transparent or almost fully transparent, and if the contrast of your screen is not set to an high level, you won't see a thing. Try to save the image and load it to Spore, and lo and behold, you would see a simple green worm like creature. If you would look at the pixels composing the image, you would notice that only the LSBs are changing.
Reading the LSBs (if you haven't gone to Ned's post, do so now, to get a python script to read those pesky bits), you'll see no pattern at all. It seems that Spore's creators have either encrypted the creature's model, or compressed it. Moreover, saving again the same creature would create a different set of values for the LSBs, though the only thing that changes in the creature's model is probably a timestamp.
So we can't (yet) read the creature's model from its .png file. Can we at least change the LSBs of one creature to another's LSBs? Can we take an innocent png file and load into it a very vulgar creature (like this one, be warned), and publish it in Sporepedia? Apparently the answer is no. Such a chimera fails to load in Spore. Apparently the creature model encodes a checksum of some sort for the whole picture. I'm hopeful that this limitation could be overcome in the near future. In my next post I'll write a bit about how can one do research in this area. (A spoiler - don't upload your creatures to Sporepedia using your main email address).
I won't write about the game itself, it suffice to say that from the computer science point of view, it's already marvelous, and from the biology point of view, it could be better. I would like to write a bit about how creatures are saved.
It turns out that spore saves its creators in plain .png files. Here's an example (WayneRTron):
If you open those file with any regular image viewer, you'll just see a picture of the creature. However, if you drag those images into Spore Creature Creator, the 3d model of the creature would open up.
It is still a mystery how Spore is able to do that. One thing is almost sure - the creature model is coded in the LSBs of each pixel in the image. You can see it by taking only those pictures which are fully transparent (the white background around the creature above). You'll notice then that only the LSBs of those pixels are changing. This shows that indeed something is hiding in the LSBs (why would they otherwise change if the pixels are transparent?), and that there's nothing coded in the other bits.
Not convinced yet? Take a look at the following picture.
Don't worry if you don't see anything. I promise you there is indeed a picture in the center of the blank lines above (try right clicking around). The deal is that all of its pixels are either fully transparent or almost fully transparent, and if the contrast of your screen is not set to an high level, you won't see a thing. Try to save the image and load it to Spore, and lo and behold, you would see a simple green worm like creature. If you would look at the pixels composing the image, you would notice that only the LSBs are changing.Reading the LSBs (if you haven't gone to Ned's post, do so now, to get a python script to read those pesky bits), you'll see no pattern at all. It seems that Spore's creators have either encrypted the creature's model, or compressed it. Moreover, saving again the same creature would create a different set of values for the LSBs, though the only thing that changes in the creature's model is probably a timestamp.
So we can't (yet) read the creature's model from its .png file. Can we at least change the LSBs of one creature to another's LSBs? Can we take an innocent png file and load into it a very vulgar creature (like this one, be warned), and publish it in Sporepedia? Apparently the answer is no. Such a chimera fails to load in Spore. Apparently the creature model encodes a checksum of some sort for the whole picture. I'm hopeful that this limitation could be overcome in the near future. In my next post I'll write a bit about how can one do research in this area. (A spoiler - don't upload your creatures to Sporepedia using your main email address).