don't click here

Sonic R Hacking

Discussion in 'Engineering & Reverse Engineering' started by MainMemory, Dec 1, 2009.

  1. RDNexus

    RDNexus

    Member
    Well, let us hope someone else may get interested in the project, someday, and picks it up.
    The game would feel more complete with those higher-quality models properly playable...
     
  2. InvisibleUp

    InvisibleUp

    friendly internet ghost Member
    139
    13
    18
    To get the models actually working is a lot of effort I'm not really sure if I want to put in. I've been warming up to the idea of working with Sonic R again after just getting overwhelmingly sick of the game sometime last year, but I'm still wanting to do other things too.

    Anywho, for anyone/maybe myself who wants to try here's a rough guide for how I'd go about doing that:

    - I'd first want to rewrite my model exporter so it properly supports creating the .GRD files that control the character lighting. Otherwise you'd get either the weird shimmering effect in the video as the wrong Gouraud shading is applied to the polygons, or alternatively the flat shaded look that Redux had, which isn't great.
    - I'd have to fix the issues with blinking and the metal character's jets, which all overwrite the texture coordinates of an arbitrary polygon. I'd have to figure out a good way to mark what index polygon has what animation and then figure out how to feed that back into the code.
    - Tails' tails use a funky method to connect the different tail parts. I believe it just tries to draw a quad between 4 hardcoded vertices with hardcoded texture coordinates, which would all have to be changed.
    - Xinus wanted to change the menu models too, which use the same format as the tracks. I managed to do this once for Redux, and the track loader is much more lenient compared to the character loader, so technically speaking it wouldn't be hard. Except, again, the Gouraud shading still needs to be taken care of.

    Actually, looking at that video Xinus got a lot further than I thought he did, although I believe there were still some significant issues such as the game crashing when too many custom models were loaded.

    Also, if I'm doing all of this I might as well port the character loader from Redux to the 2004 version. We can't use the existing one for a lot of stuff, because it allocated a fixed size memory buffer at compile time. This basically consists of adding an init function when the game's starting up that allocates a block of memory for all of the character data and repoint EVERY reference to the model data in the code to that new pointer. This actually would be a lot easier to pull off with the mod loader, because I can do the allocation in the DLL and then use the mod loader's patching functions.

    But yeah, I currently have no plans to do any of that. Sorry.
     
  3. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    Extending the character model loader would be a great feature to integrate into the mod loader directly, if you ever did want to do that.