don't click here

Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. Spiritix

    Spiritix

    Member
    4
    0
    0
    Thaaat was what I was looking for. I knew I was missing something. I thought that was what split was for. Clearly I don't know anything, thanks for being patient with me.
    What is split for, then?
    EDIT: I got into the game! I can see all its textures! I'm so happy, thank you so much! :D
     
  2. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    Hi everyone,

    I succesfully ported Knuckles to my Sonic 2 disassembly, and now I thought it would be nice if when played as Knuckles, the levels are the way they are when Knuckles is played with through the lock-on way, with all the extra life monitors and such. Now I know that's possible to program, shouldn't even be too hard, but what I'm asking here is what would be the best way to go? Should I just port Sonic and Tails to KiS2? Is it better to overwrite the S2 levels with the KiS2 ones, with the extra areas just not being accessible to Sonic and Tails? Can I just give the game a command to run Knuckles' version of the levels when he's selected if I add the KiS2 disassembly to my Sonic 2 disassembly? Is there a downside to one of these methods? If I need to change labels, how can I know which ones? What do you guys think would be the best (not easiest) way to go around this?

    If any of you guys know or there's a tutorial pointing to the answers of any of these things I'd be thrilled to know! Sorry to ask so much at the same time.
     
  3. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    I wouldn't recommend porting Sonic and Tails to KiS2, and adding the KiS2 disassembly to the Sonic 2 disassembly doesn't even make sense, but if you just want to change the object layouts (which is the only difference between S2 and KiS2 levels), you can use my ObjectLayoutDiff program to modify your object layout files. If you really wanted you could make Knuckles use different files.
     
  4. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    So you say the best way would be to just change the S2 levels to the KiS ones? I already suspected that was the way to go indeed. And the code of the game itself wouldn't need to be adjusted at all, right? But I was just asking.

    Another question: If I just download the GitHub assembly of S3K and build a rom without ANY modifications, the rom builds just fine, but if I try to complete the first level with Tails, something weird happens before the end, where you run up that building right before that boss who doesn't hurt you appears, and Tails dies. Aside from that everything works fine. Is that just me or a little boo-boo in the assembly?
     
  5. Clownacy

    Clownacy

    Tech Member
    1,060
    607
    93
    Oh, you have got be kidding me... Yup, Sonic3_Complete is bugged.

    EDIT: Fixed it. Not really sure what caused it, though. Moving some S3 data around seemed to stop the bug from happening.
     
  6. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    Thanks!

    Now I can try modifying the code a bit. Now, if I want to "clone" a character, let's say I want to make a Shadow character from Sonic's code(which I do), which labels would I need to change to prevent errors? Sorry for asking so much, but I do believe that is what this topic is there for.
     
  7. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    The traditional method of adding new characters is to copy all of Sonic's code (basically everything from Obj01: to the end of the animation script), and change all of the labels so none of them are duplicates of Sonic's.
     
  8. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    I was afraid of that. Now, and then wat should be my last question for the moment, which are actually 2 questions: Is it possible to add a 2 player option to S1? Because if so I want to add an S2-like options menu to S1 to select some new characters. If that's not possible I want to switch characters by pressing left/right on the title screen. Example: I press left on the title screen, the title screen now changes to reflect the chosen character and if you press start, you start playing with said character.

    So is porting the split screen versus mode to S1 possible, and what would I have to do to achieve what I want? If anyone could point me in the right direction for a bit, I should be off your asses for a while. :P
     
  9. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    Porting Sonic 2's 2P mode would be incredibly complicated, so much so that I would recommend just hacking Sonic 2 instead. Even then, getting everything to work properly in interlaced mode is a challenge in itself.

    Adding menus and multiple characters to Sonic 1 has been done many times, I can't help a lot with that since I don't really work with Sonic 1 though.

    The thing about hacking is that anything is possible, as long as you stay within or work around the limitations of the hardware. Some things, while completely possible, would require more effort than the hacker is willing to give to achieve.
     
  10. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    Okay, thx for everything. The kind of character select I wanted in this case shouldn't be too hard, should be able to find out myself. And if not, I'll be back.

    And indeed, if it's such a hassle I'll just give up on the 2P VS in S1 for now (at least while I'm still turd-ish).

    Edit: lol @ the turd edit.
     
  11. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    Hi,

    Another question: I now have 2 sets of object layouts for the Sonic 2 levels (1 from S2, and 1 from KiS2, duh). As MainMemory pointed out it should be possible to make Knuckles use different files. I tried this once and it didn't work. I used if->then code on the BINCLUDE objects, like: If flag X is set, BINCLUDE Knuckles' version of the .bin file. That didn't seem the way to go. Now before I go out of my way to ask you guys what I did wrong, I'm wondering if there is any benefit to have Knuckles and Sonic use different files. The Knuckles layout's of course have several additions, but I don't know if they removed anything, or if it fucks Sonic's and/or Tails' gameplay up.

    So, my question basicly is: Do the KiS2 layouts remove anything that IS present in S2, or can I just overwrite the S2 files without any downsides for Sonic and Tails?
     
  12. DigitalDuck

    DigitalDuck

    Arriving four years late. Member
    5,349
    437
    63
    Lincs, UK
    TurBoa, S1RL
    A couple of things change for Sonic & Tails (Aquatic Ruin pillars? I'm not sure if that's because of the layout, though), but unless you're dead set on keeping the layouts 1:1 to the original you're not going to ruin anything by replacing them.
     
  13. Clownacy

    Clownacy

    Tech Member
    1,060
    607
    93
    They do remove an object or two, but that only seems to be to make the levels more accessible to Knuckles, what with his gimped jump, and all. They also add a bunch of invisible walls, to keep him from climbing in weird places or gliding under the level, I imagine. I can't imagine any of this being a problem for Sonic/Tails. In fact, I've been using KiS2's object layouts in my S2 hack with Sonic/Tails for months now, and, throughout multiple test playthroughs, have encountered no issues. If you want to check, yourself, check this out. You can open the files in a text editor and, assuming you know the object layout format, see for yourself what was added or removed.
     
  14. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    As a matter of fact, I am a little. The purpose of my hack is to stray as little from the original gameplay as possible. While I already have just overwritten the layouts, it still might be interesting to know how it's done, for educational purposes, in case I ever want to create a different route for a character in a level in future hacks. Could anyone tell me how this would be done? Not asking for a full tutorial, a simple code like "binclude this if player_mode=* and binclude that if it's not" will do. I probably used the wrong commands last time I tried. Didn't get any errors building, though, but it just always loaded the first layout of the 2.

    Anyways, thanks for your help!
     
  15. DigitalDuck

    DigitalDuck

    Arriving four years late. Member
    5,349
    437
    63
    Lincs, UK
    TurBoa, S1RL
    Well, binclude is a macro that includes another code file at that spot; it's performed at compile time. Unless you're building two different hacks each with a different character, that's not going to work.

    You'll have to include both variants of the level and set which one to load during the level load routine.

    (There are other, more efficient ways of doing it, but this is the simplest.)
     
  16. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    Aha. That explains why my attempt didn't work. Thanks.

    Different question: I want a S2 style Options menu in S1. What would be the way to go? Is there a good tutorial on this?
     
  17. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    Never mind, wanna do it a different way now. As I want to stay as close as possible to the original gameplay, I thought it would be nicer to just select the character from the title screen, there being no other options to add and all. I thought about what would be a nice way to select characters from the title screen, and this came to mind:

    [​IMG]

    See that little Knuckles? I want to select characters by pressing a button to change the character. The code for that is by itself very simple, but I actually have no idea how to add a sprite to the title screen! If somebody can just tell me the code to render a certain sprite from a certain file over the title menu, I should be able to figure the rest out myself. As a matter of fact, I already have. ;)
     
  18. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    It'd be as simple as having another instance of the PRESS START BUTTON placed below the one that says PRESS START BUTTON, and having that instance display a new sprite. You likely won't be able to have Knuckles appear EXACTLY like that without some trickery... due to palette limitations...

    But that is how you'd do it. From there you just place controls in to have certain button input change a character selection variable (Let's say, 0-2 for Sonic Tails and Knuckles) and have said variable's value moved to the instance's obFrame (mapping_frame) OST.
     
  19. pukulan10jurus

    pukulan10jurus

    Pending Member
    0
    0
    0
    I think you misunderstood my question. I'm not THAT retarded.

    The "PRESS START" thing loads that text from a (hexa)decimal adress, I want to point to a .bin file, like the characters and levels do.
     
  20. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    Ok then I'm completely lost... all the art in the disassmbly, be it characters, levels, badniks... even the PRESS START BUTTON... ALL come from .bin files.

    The PSB (for short) does not actually load text at all. In fact if you look at VRAM on the title screen, it doesn't even contain all the letters to spell out the three words, as a couple duplicate letters are omitted. The mappings simply put the art that resembles the letters together to spell out the word... but it's no different of a sprite than the characters or anything else...

    So yea I've no idea what you mean. Those .bin files, as you know, are loaded into the ROM on compile time... and all the sprites, including PSB... don't even point to the art in the ROM at all... the art in the ROM is loaded from its location into VRAM which is then displayed. You cannot have it point directly to that location in the ROM and load it as is, all willy nilly... it's gotta go into VRAM.