Releasing my level combiner

Discussion in 'Engineering & Reverse Engineering' started by Hayate, May 4, 2008.

Thread Status:
Not open for further replies.
  1. Hayate

    Hayate

    Tech Member
    Download

    This is a small utility I wrote to allow you to combine multiple levels into one. It runs on the command line.

    Usage: levelsfolder objectsfolder zone act1x act1y [act2x act2y [...]]
    levelcombiner will produce a file called <zone>.bin in each specified folder, and will overwrite without warning.
    levelsfolder is the folder to all your level layouts, objectsfolder is the folder to all of your object positions files. zone is the name of the zone you want to convert (e.g. ghz).
    It assumes everything ends in .bin, and your acts are numbered ghz1.bin, ghz2.bin, etc. The number of acts it adds is determined by how many positions you specify. The positions are just given as pairs of decimal numbers after the first three parameters.

    For example,

    levelcombiner levels objpos ghz 0 1 37 4 83 4 123 0

    will look in the folders levels and objpos, convert 4 ghz acts, placing the first at chunk position (0, 1), the second at (37, 4), the third at (83, 4) and the fourth at (123, 0).

    Objects are also moved to their correct positions, and the combined level's size is the minimum required to contain all specified acts.
     
  2. Dark Sonic

    Dark Sonic

    Member
    13,480
    710
    93
    Working on my art!
    So with this program could you combine all the acts of each individual level to get rid of acts entirely? That'd be pretty cool.
     
  3. Ambil

    Ambil

    I want that heinous hedgehog hammered! Member
    893
    0
    0
    Spain
    Does this application need any special driver to work? Can't open it on Windows XP SP2.

    It gives me some error like "Application cannot start correctly (0xc0000135)."
     
  4. nineko

    nineko

    I am the Holy Cat Tech Member
    5,941
    125
    43
    italy
    This is because Hayate loves to use <s>.GAY</s>.NET for no reason.
    If you want I can write a tool like this in a decent language. As a matter of fact, I already made one for R.Solaris a few months ago, allowing him to merge 8 levels from Sonic 2 into a single big Sonic 3 map:
    1 2 3 4
    5 6 7 8

    If people are interested I can release it publically, especially because it doesn't need .GAY stuff to run.
     
  5. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    354
    3
    18
    Largo, FL
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    Sounds like it's for Sonic 1, but does it work with Sonic 2? Other than that, it seems cool. I'll try it out later.

    I'm very interested. That sounds like something I might need for a little test I'm trying to figure out..
     
  6. roxahris

    roxahris

    Everyone's a hypocrite. Take my word for it. Member
    1,224
    0
    0
    Doing anything at all
    That would be awesome! I really want to put Sonic 3 style acts into my hack!
     
  7. SephyUK

    SephyUK

    WHY SO CURIOUS? Member
    597
    0
    0
    Qatar
    Some Freakishly Long Anime
    This seems rather interesting, but then again, it will be horribly overused, now, wouldn't it?

    And Nineko, I would be quite interested in seeing that. God, 8 levels? Now I want to play that hack! :P

    EDIT: A readme for what you do after combining would be nice, although it should be just a simple change of pointers, correct? Or is that what prevents the n00bs from using it in EVERY HACK?
     
  8. HighFrictionZone

    HighFrictionZone

    Hi. Member
    855
    0
    16
    Katy, Texas
    Nothing
    Yes. .NET can go die in a ditch.

    EDIT: To be more specific, though, .NET programs which I cannot get to operate correctly using Mono on WINE can go die in a ditch. This program, believe it or not, actually does "function" in the sense that I can run it and it (probably) does stuff (unlike the vast majority of .NET applications). Bonus points for creating a .NET application that is actually as platform-independent as .NET tries to pretend it is. No idea if it actually works, and I don't actually have a use for it at the moment, now that I think about it, but I suppose it will work if I ever need it to.
     
  9. Hayate

    Hayate

    Tech Member
    No, it won't work for Sonic 2, unless for some reason you're using 256x256 chunks :P

    .NET was made for these kinds of things. You can make a utility like this ridiculously quickly, and it still runs accurately. If it wasn't for .NET, I'd have to write the same bullshit internals for everything I wrote, which would be a complete waste of time. .NET should be used for anything that isn't time-intensive.

    You can easily use the newly created data straight away, if the combined level is smaller than $40x08 chunks. Otherwise, you'll need to rewrite quite a lot of the engine to get the game to support big levels, like I did.
     
  10. PsychoSk8r

    PsychoSk8r

    PsychedelAnt | Tone Turner Oldbie
    2,582
    3
    18
    Birmingham, UK
    30 Day Project: Revisited.A New Release!
    Hayate has got the right ideas here =P
    .NET isn't exactly a pain to use though, I mean, It auto-installs with windows for me ( <3 Piracy ). It not exactly a hassle to download it either, now that we're in the age of broadband =P
     
  11. Last time I installed the .NET Framework, it required a reboot.

    I'm not against using it however, but I personally stopped using it; I switched to C++. <3 wxWidgets.
     
  12. Trunks

    Trunks

    AGAIN TRY Oldbie
    Can anyone whip up an example rom? I'm curious to see this stuff and have next to no time to figure it out right now. :/
     
  13. JcFerggy

    JcFerggy

    Do you want to taco 'bout it? Member
    1,322
    23
    18
    Nova Scotia, Canada
    GoldenEye: Source, Other Stuff
    I would also be interested in seeing a rom with all the Sonic 1 levels into one act. Also, how does this handle SBZ, with it being different each act and all?
     
  14. Skaarg

    Skaarg

    Member
    3,683
    0
    16
    Unless he thought of this while making the program, my guess is that SBZ 3 would get added onto LZ since it's really LZ4. Then FZ (SBZ3) would get added onto SBZ2. I can't say though since I can't try it out right now since I'm at work.
     
  15. Hayate

    Hayate

    Tech Member
    Yeah, I didn't make this program so you could just run it on a default disasm and have instant S3K effects. If you want that, you have to sort out the signpost, and the camera engine as mentioned before, and think about what to do with SBZ. I actually have no idea what one would do about default SBZ, but it doesn't bother me since I'm ditching the "SBZ3 = LZ" nonsense in SATSEE, not to mention redoing SBZ from scratch. :P
     
  16. Thehackery

    Thehackery

    20
    0
    0
    Newcastle
    Sonic The Hedgehog 1.1 and Sonic The Hedgehog 2.1
    I can see a flaw in using this for Sonic 1. Isn't something like this going to hamper access to the special stages?
     
  17. Hayate

    Hayate

    Tech Member
    ...

    I.e. fix SS exiting, too.
     
  18. Thehackery

    Thehackery

    20
    0
    0
    Newcastle
    Sonic The Hedgehog 1.1 and Sonic The Hedgehog 2.1
    Doesn't matter, all my special stages (Except no. 1) are corrupted, so I'll have to remove them anyway if I want to enter Death Pit Zone in the hacking contest. That gives me an idea. The hack could be the first in a 2 parter, the sequel could be Sonic's chance to get the emeralds.
     
  19. Hayate

    Hayate

    Tech Member
    Or fix them :P
     
  20. SephyUK

    SephyUK

    WHY SO CURIOUS? Member
    597
    0
    0
    Qatar
    Some Freakishly Long Anime
    If you fix them, you can still have special stages, and you can just have longer levels, while retaining the amount of acts, so there is still an equal chance of getting them all.
     
Thread Status:
Not open for further replies.