don't click here

Examining Sonic 4: Episode II Internally

Discussion in 'Engineering & Reverse Engineering' started by SpeedySpikes, Mar 9, 2013.

  1. SpeedySpikes

    SpeedySpikes

    I'm yellow. Don't you judge me.
    20
    0
    0
    Sonic Colours Unity (Primary Developer)
    I bought the iOS version of Sonic 4: Episode II on release day. I have a jailbroken iPhone 4 with iFile on it, so I decided to dive in and see what makes this game work. Here's what I've found so far.

    First of all, I found files that were laid out almost exactly like the PC version of Sonic 4: Episodes I and II, which means it completely derived from that version. I found in iOS Episode I that there were several things changed, such as the use of .CSB for music and splitting of the CSB files (That's why the load times are longer: Each zone had a .CSB file for music). However, diving into Episode II I found something interesting: The music archives are a different format. Now they use .ACB, which I am not familiar with at all, and I'm sure that none of you are familiar with it either. Well, techies, let's get crackin'!

    The standard game files use the ever-so-popular .AMB format, so those will most likely be easy to crack open. I will when I get a chance and point out any oddities I find.

    It includes a bunch of Episode I's data and resources, because of Episode Metal, but that should have been assumed.

    There are probably two models for each map, assumed by looking at the contents of the G_ZONE(x) folders. There was a MAP folder and a MAPFAR folder, so that led to this assumption.

    Episode I used .PVR for textures, and, guessing from the proper use of alpha for textures instead of jagged lines, they either figured out the PVR format completely or used a different image format. I know that the PC version of Episode I used .DDS, so I'm curious. to see what they did.

    Episode II on iOS supports iCloud saving, but this is a find for iOS as a whole: The User Library folder stores iCloud saves and gets them from iCloud servers. Then the save files are either read from there or transferred to Episode II's Documents folder.

    The iOS version contains two PLY folders in the G_COM folder; one has a suffix _HD. This is because the iPad uses the _HD folders. Yes, this is plural; I found some more in the Episode I folders.

    The cutscenes are video files in standard iOS format, but that should have been assumed. I mean, the videos use the PC/360/PS3 graphics, and it's easy to tell when first starting the game that the cutscenes are videos. It fades out after playing the intro cutscene and then loads up the actual game models. Plus, the smoother framerate of a constant 30 fps in cutscenes compared to the varying speeds on an iPhone 4 ingame.

    All of these findings are from just looking at the outside. I am transferring the Episode II app folder to my computer now, so I will crack open what I can and find out what I can about the game. My ultimate goal was to get the low-poly maps and character models. People have the music already from the PC version, but we had better figure out the .ACB files quickly, before they use it again.

    I will follow up with more information when I get it.
     
  2. darkspines35

    darkspines35

    It's Easy Actually. No, seriously. Tech Member
    248
    0
    16
    .V.
    Sanik Adevnt Casters
    Model format is .ino. It's little endian and likely based on XNO/ZNO. Never bothered with it and likely won't given the current iOS titles do not use it.
     
  3. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    3
    0
    across town from Hinchy
    All the bitches.
    MAPFAR is the background. There's not 2 models for the stages, they are split up into chunks pretty much how the genesis games are, each shape has a model that is duplicated over the stage by a layout file that tells it were it goes. It's a simple format that just is a grid the first 4 bytes specify the width and height. It goes left to right, then moves onto the next line down and keeps going. There's absolutely nothing different in the main game archives or layout formats between the PC and iOS version.
     
  4. dsrb

    dsrb

    Member
    3,149
    0
    16
    How is this conjecture proved by that evidence? Did you not consider the possibility that the lineage goes the opposite way? In fact, there was a bunch of (admittedly circumstancial) evidence suggesting that S4EI was originally developed on iOS, chiefly the inclusion of the minecart level and its 'unique' control scheme, etc.
     
  5. Sappharad

    Sappharad

    Oldbie
    1,413
    70
    28
    There's nothing mysterious about .PVR textures being used in the iPhone version.
    iOS devices use PowerVR graphics chipsets, and the iOS SDK includes tools to convert textures to compressed PVR format. It's a compressed texture format natively supported by the hardware, and it was probably the best option for older devices with less RAM and CPU power. It's not the same as the PVR format used on the Dreamcast, which also had PowerVR graphics.