Users browsing this thread: 5 Guest(s)
IOS map rip
#1
Hello. I was wondering if anyone can give me some advice on getting graphics from an iOS game. Specifically Im trying to work out how to view the background maps.

I downloaded the game to my PC. It was an '.ipa' file. I extracted it with 7-Zip. Then looked all around and found various png files. The character and NPC sprites are all present in standard looking sprites sheets (awesome), but the maps are a different story.

Basically the map for each level is one big png file but its all mish-mashed up into a combination of little blocks and larger rectangles. Ranging from about 16 x 16 px up to say 16 x 100 px.

I notice that each map is accompanied by an identically named .xml file and an identically named .map file. When I open the .xml file I see co-ordinates. For eg: <entity id="392" x="-4" y="67" path="0" angle="0" />
When I open the .map file in Dreamweaver I see garbled symbols that make no sense to me.

...So I deduce that the .xml file contains info about how the graphics in the .png file should be laid out to make the map flow smoothly during game play.

What I want to do is somehow piece that png together into one single image that looks like how the maps looks during game play.
Is there any way I can do this with the 3 files I have for each map? (.png, .xml, .map)

Thanks for any help.
Thanked by:
#2
This looks interesting, similar to my situation with Bastion sprites (also had .xml files with ordering information). If nobody does it before me, I may take a look at this after school and see what I can do.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Thanked by:
#3
Hey man thanks for replying. So, are you saying you want me to send you the files to look at?
Thanked by:
#4
That, or you can just give me the name of the game and I can probably find an .ipa of it online myself. That way you won't have to upload anything.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Thanked by:
#5
I pm'd u.
Thanked by:
#6
Puggsoy you mentioned you had a similar situation with another game: having .xml files with the graphics. Did you figure out how to use the .xml file to order or ungarble the graphics in that instance?

Hmm seems like I can't pm u. U didnt receive a pm from me right? Well anyway, the game is called superlaser. Let me know if u can't find it and ill send u some files.

Thanks Puggsoy
Thanked by:
#7
I did get the PM, there's a bug in the system that says PMs aren't sent, while they actually are. I suppose I should have replied though, sorry.

With Bastion the sprites weren't exactly garbled, but they were unaligned and in random order. I expect they were organised in such a way to keep the image size as small as possible, and the game just used the .xml to grab the animations it needed.
I managed to write a small program to organise them, for example I managed to organise this into this (be warned the images are rather large). The program is still pretty messy and doesn't work 100% with all .xmls but it does the enemies OK. I've been meaning to get back to it to try and make it work with all the sprites.

Anyway yeah, I got an .ipa of Super Laser, although it was a bit hard to find (had to go on a Chinese site). I see what you mean, it is pretty garbled. The .xml looks helpful, but unfortunately it doesn't state the size of each chunk (unlike the Bastion .xmls), only the x and y (some of which have weirdly large values). I also have no idea what "path" means, and some like bridge.xml have no content at all.
I suspect the .map contains some useful data but I don't know what to do with it. I'll look at it in a hex editor later on today though and see if it yields anything.

If it doesn't work out, it looks more than possible to arrange the maps manually. Tedious work, but they're not as big as most games so with a bit of persistence it's doable.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Thanked by: Hammster
#8
I'd assume that the map files contain the entities (IDs and Rect coordinates) for the map chunks, so looking for data resembling the entity numbers may help to find the file structure.
Thanked by: puggsoy
#9
Quote:I did get the PM, there's a bug in the system that says PMs aren't sent, while they actually are. I suppose I should have replied though, sorry.

With Bastion the sprites weren't exactly garbled, but they were unaligned and in random order. I expect they were organised in such a way to keep the image size as small as possible, and the game just used the .xml to grab the animations it needed.
I managed to write a small program to organise them, for example I managed to organise this into this (be warned the images are rather large). The program is still pretty messy and doesn't work 100% with all .xmls but it does the enemies OK. I've been meaning to get back to it to try and make it work with all the sprites.

Anyway yeah, I got an .ipa of Super Laser, although it was a bit hard to find (had to go on a Chinese site). I see what you mean, it is pretty garbled. The .xml looks helpful, but unfortunately it doesn't state the size of each chunk (unlike the Bastion .xmls), only the x and y (some of which have weirdly large values). I also have no idea what "path" means, and some like bridge.xml have no content at all.
I suspect the .map contains some useful data but I don't know what to do with it. I'll look at it in a hex editor later on today though and see if it yields anything.

If it doesn't work out, it looks more than possible to arrange the maps manually. Tedious work, but they're not as big as most games so with a bit of persistence it's doable.

Cool that didn't take you long to find it. Great so now we are both looking at the same thing. Thanks heaps for taking the time to look into it.

I have been playing around with a tool called 'XMLSpriteSheet Animator', which is supposed to take an xml file and it's associated png sprite sheet and make sense of the two, but no luck there.

Yes I have tried to go through and manually piece together the maps but they are seriously all over the place. As you say they have probably been jumbled together in the most space saving way, rather than any kind of order. Ultimately I want to get the maps for all levels and doing it manually is probably a last resort. Ill do it that way if I have to but there has to be an easier way Big Grin

Quote:I'd assume that the map files contain the entities (IDs and Rect coordinates) for the map chunks, so looking for data resembling the entity numbers may help to find the file structure.

Ok, hopefully you guys are right and the .map files contain some useful info. I tried to open the .map files with notepad and Dreamweaver and just get garbled weird symbols. Ill try a Hex editor too as Puggsoy suggests.

The problem remains of how to use the info in the .map and .xml files to piece the images all together though.
Thanked by:
#10
Well, I'm finding patterns. I've never attempted to decode a format myself before but hopefully I'll get lucky and be able to uncover something.

(02-27-2013, 07:04 AM)Hammster Wrote: The problem remains of how to use the info in the .map and .xml files to piece the images all together though.

Honestly, this is the easy part. Once I know where to find the information and what it means, I can just write a program that can read the information and manipulate the image accordingly.
Or were you saying that it'll be difficult to find out what it means?

EDIT: Gah this is confusing. The bytes seem to be paired in chunks of two (16-bits/shorts), and probably read in little endian (backwards), but each file has a totally different layout. They seem to have a habit of counting upwards, but sometimes it's interrupted or there's a chunk of emptiness (usually "00 00"s or "00 01"s).
This might take a while Unsure
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Thanked by:
#11
What did you use to open the .map files in the end puggsoy?
Thanked by:
#12
HxD Hex Editor. It'll look like gibberish unless you've worked with bytes before, since what it does is just show the bytes of a file in hexidecimal form.

The problem is that I can't see which bytes make up what, so I can't use it. I can see some patterns but only the first two bytes seem persistent for each .map file, otherwise I don't see any helpful patterns between them. I'll keep thinking/looking/experimenting though.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Thanked by:
#13
I cant find any programs that can help me to unscramble the images, so unless you puggsoy or anyone else with some programming skills can figure out how to make sense of those files Ill have to do it manually.
Thanked by:
#14
Well I'll still keep trying, although it could take days. If I give up, or discover that the .map files don't contain any useful data, I'll say.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Thanked by:
#15
(02-28-2013, 05:54 AM)puggsoy Wrote: Well I'll still keep trying, although it could take days. If I give up, or discover that the .map files don't contain any useful data, I'll say.


Puggsoy did you see in the dir one level up from where the map .png's are there is another .xml entitled 'entities'? Does that have any info in it that you can use?
Thanked by:


Forum Jump: