Home > aen's Blog

Tile Ripping

Tonight I whipped up a quick little tile ripping proof. It's the beginnings of a Super Tasty Ripper, so I called it Stripper. I apologize to any whom this may offend.

I entertained the thought of dubbing it Exotic Dancer, but that was just too damn misleading. And nobody likes a tease anyway! You understand, of course.

stripper, build 1

The screenshots below are from Seiken Densetsu 3. The one on the left is the image freshly loaded with the grid turned on. The one on the right is the ripper in progress, with the grid turned off.

You can nudge the image around on a grid by holding down CTRL while using the arrow keys. The grid toggles on and off with CTRL+G. Pressing U rips all the tiles, finding the unique ones and highlighting them.

I stuffed the unique tile ripping into a thread and slowed it down so you can watch it work.

Instead of performing byte for byte comparisons against all unique tiles for each newly ripped tile, I create an MD5 checksum for each tile using the MessageDigest object from the java.security package, and compare tiles for matches with that.

Admittedly, I used MessageDigest because I had never tried it out before and was curious. It may ultimately be slower than a short-circuited byte for byte comparison of tiles, but it was a fun exercise.

At any rate, it's crude, slow, and funky. But it's a start! One day it will be sleek and sexy as hell. Like all good Strippers should be! *cough*

Future improvements will allow zooming, modifying the grid and tile ripping sizes, and will include a few interesting methods for performing arbitrary rips.