don't click here

Sonic 4.

Discussion in 'Engineering & Reverse Engineering' started by Polygon Jim, Oct 12, 2010.

  1. Aerosol

    Aerosol

    Not here. Moderator
    11,163
    573
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    Even so, isn't that some form of scripting on the game's part? "Oh look he's on the ceiling. Time to make him sticky!".
     
  2. DigitalDuck

    DigitalDuck

    Arriving four years late. Member
    5,338
    412
    63
    Lincs, UK
    TurBoa, S1RL
    Easily editable. Just remove the part that says "IF on_ceiling THEN make_sticky()".
     
  3. Aerosol

    Aerosol

    Not here. Moderator
    11,163
    573
    93
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    Something tells me it's not that simple. You might have to replace the removed code with something else.
     
  4. DigitalDuck

    DigitalDuck

    Arriving four years late. Member
    5,338
    412
    63
    Lincs, UK
    TurBoa, S1RL
    It's easy enough to make code to the effect of "IF 1+2=4 THEN do nothing" to fill the space. And besides, if you're replacing the physics engine, you could skip the current physics routine entirely.
     
  5. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    I honestly think it is a result of the incredibly high surface friction in sonic 4.
     
  6. roxahris

    roxahris

    Everyone's a hypocrite. Take my word for it. Member
    1,224
    0
    0
    Doing anything at all
    It's easy enough to waffle on with useless pseudocode that generally ends up having little relation to what's in the game itself.
    Hey, here's an idea! Let's make the game not suck! You can, like, do it by, like, changing the "If Player = SonicFan Then BreakPhysics()" thingy in the code to, like, do nothing! It's easy, right?
     
  7. evilhamwizard

    evilhamwizard

    Researcher
    1,392
    455
    63
    Another thing I think might be possible for those who desire higher quality graphics - can we possibly take the higher res from the 360 version's AMB files, convert them to .png, and then use Dolphin's hires texture feature to replace the textures with the ones from the 360 version. This should make the graphics a bit better looking when using a PC, not sure if it'll slow down the game to a crawl. But I think if you got the game to run at a constant 60fps on Dolphin already it should be able to take them.

    tl;dr hires graphic replacement project using the graphics from the x360 version.
     
  8. Lobotomy

    Lobotomy

    35% Cognac Banned
    4,394
    1
    0
    Traverse City
    Project: Matter/Energy
    I have a request, Polygon Jim. Can you edit a level of your choice to contain a rounded off square made of those vertical walls going into horizontal floors. You know, the ones everyone hates?

    I want to see if Sonic will run around it and not fall off
     
  9. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    You are the world's best programmer. I think you should add in your suggested modification right now.
     
  10. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    3
    0
    across town from Hinchy
    All the bitches.

    Been there, done that. It works perfectly.
     
  11. Spanner

    Spanner

    The Tool Member
    Jokingly, I would love it if somebody had the time to piece up a texture replacement based on the original zone, such as Metropolis Zone in Mad Gear and Labyrinth in Lost Labyrinth Zone. Of course, that would involve more work considering the fact that newer tiles would need to be made, but it'd just be like playing the original game...except with paper mache badniks. Is that actually possible?
     
  12. evilhamwizard

    evilhamwizard

    Researcher
    1,392
    455
    63

    pix/patch plz, just curious as to how it looks using dolphin's rendering of the graphics.
     
  13. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    3
    0
    across town from Hinchy
    All the bitches.


    I only did Splash Hill at the time but deleted it about a week later as I can't even run Dolphin very fast in the first place. It looks identical to the 360 version beyond the Sonic model itself though.
     
  14. Alphaman

    Alphaman

    Member
    17
    0
    0
    IF 1 + 2 = 4 THEN you better fix your CPU, 'cause that should NEVER be 4. If you're gonna use fake-code, at least be sure to put a variable after "IF"s, because using constants will do jackshit (unless that was in-depth joke about the incorrectly rounding Pentiums in the midnineties).

    Until we know how these segments work (I.e. what causes Sonic to stick to the ceiling like glue and keep on running) this is all just guessing anyway. Maybe ceilings really just have special attributes to them, and you could just alter the special physics aplies to these. Or it's completely different and a bitch to find out and work around. It's not like Dimp's is gonna tell us; and somewhat rightfully so - they'd somewhat admit that the product was flawed since they're supporting the fans' attempts to change it; and didn't somebody say that they said the physics can't just be changed without having to alter the rest of the gameplay as well?
     
  15. DigitalDuck

    DigitalDuck

    Arriving four years late. Member
    5,338
    412
    63
    Lincs, UK
    TurBoa, S1RL
    Point missed. It was mentioned earlier that there seems to be some switch that makes Sonic stick to walls or ceilings when he is on them; if this is the case, there will be code to that effect (although, OBVIOUSLY, it won't be written like that, especially not when compiled. I wasn't suggesting it would be.). Removing that code will stop Sonic sticking to walls and ceilings.

    Point missed even more. This is space filling; therefore it's code that does nothing. 1+2 doesn't equal 4, therefore the code after "THEN" will never be executed. That's the point.


    Jeez, guys, I'm just talking about quick 'n' dirty modifications. Clearly I'll just let you guys deal with people asking whether certain things are possible, and then watch you deal with it with needless detail that'll leave them asking many more questions.
     
  16. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    3
    0
    across town from Hinchy
    All the bitches.
    I don't have any big updates as I'm lazy and also have some other projects in the works, but as I couldn't sleep last night I worked on 2 of the simple formats in S4. Neither are complete yet, but I'll work on them some more after I get some sleep.


    Code (Text):
    1. .MSG files. Big Endian
    2.  
    3. 0x00 dword //#ASG
    4. 0x04 dword //01 02 00 00
    5. 0x08 dword //Number of text blocks
    6. 0x0C dword //00 00 00 10
    7. 0x10 dword //00 00 00 01
    8. 0x14 dword //Pointer to text offsets
    9.  
    10. text offset dword //check 0x08 for amount
    11.  
    12.  
    13.  
    14.  
    15. 00 //end text
    16. 0A //linebreak
    17. 2E //period


    Code (Text):
    1. .TXB Big Endian
    2.  
    3. 0x00 dword //#TXB
    4. 0x04 dword //00 00 00 10
    5. 0x10 dword //number of files
    6.  
    7. 0x1C dword //pointer to first filename
     
  17. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    3
    0
    across town from Hinchy
    All the bitches.
    I was going to wait until there was more too it, but full level editing is now a possibility. The stage layout/collision itself has been figured out finally.

    http://I.imgur.com/TuRZ6.png
    Built the tile layout in Photoshop as a test in that image.


    Collision and Tile layout are as follows.

    Code (Text):
    1. MP format //Big Endian
    2.  
    3. 0x00 word //grid width
    4. 0x02 word //grid height
    5. 0x04 word //this is the start of the grid
    6. ;multiply the width+height to get the total amount of spaces.
    7. ;grid goes from left to right, 1 row at a time going from top row to bottom row.
    Plane A and B collision files.
    ZONE**_ATTR_A.MP
    ZONE**_ATTR_B.MP


    Plane A and B tile layout files.
    ZONE**_A.MP
    ZONE**_B.MP



    Plane A of the tile layout and collision files will match up in grid size, and filesize. The same is true for plane B.

    As example you will see 00 09 for a flat grass tile in SHZ, at the same offset in the collision file you will see 00 EE to denote solid ground.



    Hopefully a level editor is soon to follow, I'm not a tool programmer though so I'm counting on someone else to do that part. I'll be trying to get more notes on the format soon.
     
  18. Lanzer

    Lanzer

    The saber calls for its master... Member
    6,845
    3
    18
    Glendale, AZ
    Living life.
    Wow a level editor is possible?! Thats amazing jim you found that out!
     
  19. Azu

    Azu

    I must be stupid. Member
    Wow, you've made great progress. I do hope someone is up to the task.
     
  20. evilhamwizard

    evilhamwizard

    Researcher
    1,392
    455
    63
    It'd be great if we could compare level layouts/designs from the prototypes with the final versions of the game to see what exactly was changed.

    Great work, can't wait to see what comes out of this.