The VG Resource

Full Version: IOS map rip
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Yeah I checked that out before, it doesn't seem helpful though. From the looks of it it doesn't look related to maps though, rather enemies and such.

By the way, this is honestly looking really difficult, the only thing I've discovered to far is that every file starts with "0E 00", which has no meaning to me.

I will, however, see if I can find anything helpful in an .apk of it, that is, the Android version. If I can find a proper download, it's probable that it'll have different formats and hopefully be of some help.

EDIT: So the .apk is even less useful than the .ipa.
(03-01-2013, 05:47 AM)puggsoy Wrote: [ -> ]By the way, this is honestly looking really difficult, the only thing I've discovered to far is that every file starts with "0E 00", which has no meaning to me.

People often use the first two bytes of a file as an identifier, so programs can quickly check what a file may contain (as file extensions don't really have any meaning, ever tried renaming a BMP to PNG? Yea). While common filetypes often have something that resembles the filetype name in ASCII, obscure self-made ones may contain rather random values.

So the "0E00" most likely just serves to increase the certainty that a read file actually contains data of the expected format.
I figured as much, sort of like a mini-header thing. Didn't really help though.

However, I decided to take a shot at organising one of the maps by hand, namely level01_map02_01.png, since that one looked pretty simple.
First I figured that the first white square showed the tile size, which was 32x32, so I set a grid of 32x32 pixels in GIMP. I then proceeded to grab the first line of tiles, not including the white square. I noticed that, at certain points, two adjacent tiles didn't fit together (which wasn't as obvious in this sheet, since the colours are all pretty similar). I checked it out and discovered that the tiles were lined up in chunks of 448 pixel wide strips, that is, 14 tiles. With this information, I took each line of the sheet, lined them all up in one long strip, and then broke it up into 14 tile chunks. It was then obvious that they went beneath each other, which worked perfectly, and I ended up with this:

[Image: i70fh5ppm5xGl.png]

As you can see this is supposed to be vertically repeated, and from what I know of the game it scrolls vertically.
Unfortunately, looking at the other maps, they're not as consistent and seem to have random chunks of tiles spread all over the place. There may be a pattern, but even if there isn't they should be arrangeable if you look closely and see which tiles fit together. It's basically a jigsaw puzzle, but all the pieces are squares Tongue

By the way, I also took a gander at those .spl files and discovered that they're .xmls that specify "paths". Unfortunately I think this is used for gameplay rather than assembling maps, I can't see anything that could be of use.

In any case Hammster, putting them together manually seems to be the only option, and to be frank the easiest one too. It's tedious work but, in this case at least, it seems to me more effort to try and decode the .map files, and I'm not even sure if they contain useful data or not.
I'd be glad to help with assembling them though, many hands make light work. I rarely rip maps too (usually just sprites or background images) so it'll be "educational" for me, so to speak.
Hi puggsoy since you already spent so much time with this I thought you may want to do the rest now that I kinda figured out the .map files after reading your last post and taking a really quick look (they're actually super-easy, though I can understand why you didn't see what I saw as it was your first time while I already looked through at so many hex codes of graphics and maps).

Here's the file structureas far as I can tell:

Header: 2 Bytes, 0x0E00
Map width: 2 Bytes, Number of tiles per row
Then you have 2 Byte (1 Word) per tile until the end of the file.

So, ((file size - 4) div 2) is the number of tiles, divide by map_width and you get the height in tiles, multiply the width and height with 32 to get the needed image size.

Each tile is an ID starting by 0. so 0x0000 would be the white square, 0x0100 would be the first tile after it, 0x0200 the second etc. etc. (Remember what I said about byte order? Usually data is stored in reverse order, so if you store a Word (2 Byte), the lowest comes first (-> little endian), thus 1 is 0x0100 and not 0x0001).

If you need more information or help on how to assemble them, feel free to ask.

I'd advice to calculate how many tiles you have per row in your source image so you can easily calculate the position of a given tile (x = ID mod tiles_per_row; y = ID div tiles_per_row) (mod is the modulp operation, remainder of the whole-number division, I think AS uses %; div is the whole-number division, should be / as usual if you use a variable of an integer type).

Sorry if I tell you things you already know, I don't know what you know Tongue



PS: The .xml files just contain enemy/object position stuff.
your new nickname: Genious.
Man I was half way through a reply saying "Ok Puggsoy Ill manually do mission maps 1 - 5 to start with..."

Then Previous posted... So I guess Ill hold off while you guys look at this a bit longer?

Can I just say thanks so much for looking into this for me... I appreciate the time you're putting in. Ill make a donation to the site or something?
(03-01-2013, 06:19 PM)Hammster Wrote: [ -> ]Ill make a donation to the site or something?

I'm sure that Previous/puggsoy don't expect anything for this, but, if you could make a donation that'd be amazing as the site is having a bit of financial issues. only if you can afford, though.
Oh wow Previous, that's fantastic! I actually recall planning to look at the .map files again after doing that but I guess I forgot or something. The format looks painfully obvious in hindsight now, but yeah I guess you noticed stuff I didn't since this is my first time. Hopefully I should eventually get better with experience though.
By the way, I did know most of what you said about using the bytes (each value is a word, little-endian, etc) but thanks anyway, makes me more sure.

In any case I'll get working on a parser and organiser, the format's conveniently simple so I should have it done (or at least working) before the end of the day. Now that I know how .maps work it's actually easier than Bastion Tongue

Also Hammster, as Mighty said no payment is necessary at all, to be honest I actually enjoy doing this. A donation to the site would be awesome, but really this is all for free.

EDIT: Well I didn't have as much time as I thought so I couldn't finish it today, but I gave it a shot and found that Previous seems to be a bit off on some points.

Firstly, the third byte appears to represent the number of tiles per row, but it shows the decimal number in hexadecimal. That is, in level01_map02_01.map, my hex editor shows "14" as the third byte, which has a value of 20, although it should be 14, which it displays.
Secondly, if I were to read each value as a 16-bit/2 byte value, then the first tile in the list would be 0x0100 (in big-endian), not 0x0000 as you said. For this reason I think I might just be supposed to skip the first white tile.
Lastly, in this .map file at least, the list of tiles is given twice. I have no idea why it does but it does.

Anyway, I have to go sleep now, and I have school tomorrow so won't be able to work further on this until the afternoon. You can try and figure this out if you want Previous, but if not I'll be thinking about it and experimenting myself.
I can definitely make a donation. Can somebody link me to info about how to donate to the site plz? Thnks.
well see, I brought it up to Dazz and staff, and they say that we should not accept bitcoins, only real plain money. Sad
Bitcoin is real enough Big Grin ..but Im easy. What other methods would you prefer to use? Cash in an envelope? Big Grin
For reference, I never claimed that Bitcoin isn't real. I said it's an alternate form of currency we're not currently equipped to accept. While cash in an envelope might work, I feel something like PayPal might be a bit more efficient Tongue
*coughs* I meant normal money. Rolleyes
that was just a... typo...
(03-02-2013, 06:45 AM)puggsoy Wrote: [ -> ]A donation to the site would be awesome, but really this is all for free.

Done. Someone check the tSR wallet Ninja
(03-05-2013, 04:20 AM)Hammster Wrote: [ -> ]
(03-02-2013, 06:45 AM)puggsoy Wrote: [ -> ]A donation to the site would be awesome, but really this is all for free.

Done. Someone check the tSR wallet Ninja

Got it! Took me a while to figure out what I was looking at but now that I understand what's going on, it makes a lot more sense. Thanks again! Smile

Edit:
Also, since I've only now read through the thread, I just want to thank puggsoy and Previous as they really did the work that prompted the donation!
Pages: 1 2 3