don't click here

Some generic conception(s)

Discussion in 'Engineering & Reverse Engineering' started by qiuu, Aug 17, 2008.

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

    qiuu

    Tech Member
    144
    9
    18
    Blue Ball & Blocks
    I'd consider myself a beginner to hacking, just started off a little differently: I rather fiddled around with some asm and some simplistic art instead of concentrating on palettes and original layout.

    Having always liked it, I extended on the smashable Marble Zone block allowing for the fragments to remain in the level, and set a level design around it. It is a attempt to add puzzle elements to a sonic game. As it is possible to screw up without dying, I case you get stuck, the teleport monitor will allow you to restart the level.
    This version features two levels, the first one is very slow-paced featuring only the basic block object; I tried to speed up the second one adding some springs and new subtypes of the object featuring alternate gravity.
    Level designs are preliminary, so if you suddenly see the sky full of blocks then it is a problem with the level layout.

    [​IMG] [​IMG]

    Collision with 16x16 blocks is rather awkward, so I'm contemplating rewriting the code for 32x32 blocks. Not quite certain though, as the blocks might get overly huge then...
    I also intend to add a SolidObject check for the fragments, as due to the lack of it as of now some collision issues may arise when the blocks are landing on Sonic's feet.
    Suggestions and thoughts on this are welcome.

    I drew the foreground art myself, though it is obviously inspired by Fez and a Knytt Stories tileset by pip inspired by Fez. I'm admittedly a lousy artist.
    The background art is from Marble Garden Zone with a custom layer deformation routine trying to resemble the original scrolling as closely as possible.
    I haven't looked into music hacking yet (I usually play without sound anyways), so I just replaced the unsuitable CNZ music with EHZ2P, don't mean to say that it fits though...

    Download link
    Select any Act 1 for the first level and Act 2 for the second one.

    EDIT 08-09-12: version 0.2.1 released, notes on it: http://forums.sonicretro.org/index.php?s=&...st&p=223837
     
  2. Qjimbo

    Qjimbo

    Your friendly neighbourhood lemming. Oldbie
    Nice! I've seen you over at SSRG but never post, been quietly researching? :)

    I really like the way the blocks break and the fragments pile, could lead to an interesting gameplay element.
     
  3. MoDule

    MoDule

    Tech Member
    327
    24
    18
    Procrastinating from writing bug-fix guides
    Just finished act 1 (even if I kind of glitched myself to the finish the first time). Very interesting. I look forward to what else you have in store for us.

    Edit: Just finished act 2. Tricky.
     
  4. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Cool game play. I like the idea.
    Also, awesome work on the custom BG deformation. :)
     
  5. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    Extremely neat concept! Very challenging; too challenging for me, in fact, so I gave up. =P

    This is a great technical achievement, though! You say you're new at hacking? You certainly could have fooled me, especially with the other posts you've made so far regarding layer deformation.
     
  6. FraGag

    FraGag

    Tech Member
    This is quite innovative, despite the glitches. I could finish act 2 but I can't figure out how to complete act 1 without debug. Keep working on it, I'd like to see where you'll get with this.
     
  7. Xkeeper

    Xkeeper

    lgkdfvlbjepasvdjzcvpaaaaaaaaaaaaaaaaaaaaaaaa Researcher
    1,509
    10
    18
    the bone zone
    current-project-fart
    I finished Act 1 with zipping by accident...

    Act 2 just confused me and I gave up after many tries :P Very interesting, though.
     
  8. saxman

    saxman

    Oldbie Tech Member
    At first I didn't understand the object of it. But after playing with it a while, it became pretty addictive! Very interesting hack, I like it a lot!

    BTW: Perhaps someone here could modify the assembly code to make the game check for collision directly under the player rather than to the left and right. That's the reason the collision is weird with 16x16 blocks.
     
  9. Soselocke

    Soselocke

    MEEP MEEP MEEP Banned
    Gah, I had to use debug. I'd get about 3 feet in the first level and then I'm totally stumped. Cool idea though, despite me not being smart enough to figure it out.
     
  10. qiuu

    qiuu

    Tech Member
    144
    9
    18
    Blue Ball & Blocks
    I'm glad you liked it, and thanks for your encouragement.
    I think I'll attempt to fix some bugs and try to expand on the concept a little. I've got a few ideas left, and I'll be working on it whenever I'm in the mood to do so and have some spare time.

    I'm mostly lurking at most places. I guess I haven't used invisible mode at the SSRG up to now. Changed that. :P (Sorry)

    I guess I'm learning. The assembly syntax isn't really much to learn, and M68k seems to be one of the less difficult assembly language around, to boot. The actual difficulty is understanding the Sonic engine and hardware issues. Layer Deformation was one of the first concepts I understood as it doesn't require much knowledge on how things work ingame. Having a well documented assembly available and various other resources like the SCHG makes work a lot easier. It just takes some effort sometimes to figure out what routines exactly do and values exactly mean (like ObjCheckRightWallDist actually checks the distance to the left wall and vice versa), but I try to get as far as possible on my own.

    I think I have found the routines to be changed:
    If sonic is standing on the floor, Sonic_Angle is checking the floor distance, and if Sonic is in a ball or in the air, Sonic_CheckFloor is called (via Sonic_DoLevelCollision).

    I inserted the following code in Sonic_CheckFloor before loc_1ECC6 and in AnglePos before the Sonic_Angle routine is called:
    Code (ASM):
    1.     move.b  ($FFFFF76A).w,d3
    2.     cmp.w   d0,d1   ; first and second distance value
    3.     ble.s   +
    4.     move.b  ($FFFFF768).w,d3    ; use the other values
    5.     exg d0,d1
    6. +
    7.     move.w  d1,-(sp)    ; store smaller distance
    8.     move.b  d3,($FFFFF768).w    ; store the angle associated with that value
    9.     move.w  y_pos(a0),d2
    10.     move.w  x_pos(a0),d3    ; check directly below sonic
    11.     moveq   #0,d0
    12.     move.b  y_radius(a0),d0
    13.     ext.w   d0
    14.     add.w   d0,d2
    15.     lea ($FFFFF76A).w,a4
    16.     movea.w #$10,a3
    17.     move.w  #0,d6
    18.     bsr.w   FindFloor
    19.     move.w  (sp)+,d0
    20.     move.b  #0,d2
    Essentially it is a third check at the position directly under Sonic, and the minimum value for the distance and the associated angle are returned.
    It seems to work, apparently.

    It's 5:30am now, guess it's time to go to sleep...
     
  11. Rika Chou

    Rika Chou

    Tech Member
    5,276
    169
    43
    Wow, this is a neat hack. I got passed the first level because of some bug that forced me through the wall, then got a gameover on the second level.

    I love it so far! Very addicting!

    Edit: Just got passed both levels without using bugs or debug mode. Woo! There's this one bug in the second level that causes a lot of small floating blocks everywhere. It happens if you knock a certain block to the left and there is nothing to stop it so it goes off screen past the left boundary of the level.

    Also, there is a bug in the first level where the screen will lock if you get too close to the signpost and makes it impossible to do anything.
     
  12. saxman

    saxman

    Oldbie Tech Member
    I don't think that's a bug, I think he made that happen on purpose. I see no other way to beat the level other than to have those blocks there.
     
  13. Rika Chou

    Rika Chou

    Tech Member
    5,276
    169
    43
    Really? I beat it without those...and the block that causes it is used for something else.
     
  14. roxahris

    roxahris

    Everyone's a hypocrite. Take my word for it. Member
    1,224
    0
    0
    Doing anything at all
    This hack is great! I just beat it! A few bugs I noticed, though. In the second stage, that block near the spikes, if you break it to the left, eventually the screen will fill with blocks for no reason...
     
  15. saxman

    saxman

    Oldbie Tech Member
    After looking again, maybe it is a bug. I just assemed it was meant to do that because that's how I beat the level was creating those small platforms and jumping across, using the springs to climb up to the next row, and the next row, until I finally made it to the end. It actually works!
     
  16. RattleMan

    RattleMan

    Oldbie
    154
    0
    0
    Awesome hack! I finished both Acts and it was extremely fun figuring out what to do.
     
  17. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,218
    965
    93
    Long-term happiness
    Waaaaaaaaaaay too hard for me, but a very interesting achievement - nice work.
     
  18. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    3
    0
    across town from Hinchy
    All the bitches.
    Very hard, but it's a very fun idea. I'd like to see were you go with this.


    Also, someone made tech member really fast =P
     
  19. qiuu

    qiuu

    Tech Member
    144
    9
    18
    Blue Ball & Blocks
    Awesome, now I can view the private porn there!

    Thanks for the bug reports; I now added a SolidObject routine to avoid those collision problems and shifted the signpost of act 1 a bit to the right.

    As for the small floating platforms that appear and fill the screen, it is not intended and that was what I was referring to when I wrote:
    "Level designs are preliminary, so if you suddenly see the sky full of blocks then it is a problem with the level layout."
    I almost expected it to happen somewhere, just did not encounter to me when I checked. Also, in some occurrences more than one part of the level are affected when blocks land, namely if a chunk is used multiple times. I have to fix the level design to ensure that this won't happen.

    EDIT: Just noticed that my proposed solution to the collision problem has a downside: ledge detection seems to be faulty in a few instances now causing Sonic not to tumble when standing on a right ledge of a block. Got to look into it again...
     
  20. qiuu

    qiuu

    Tech Member
    144
    9
    18
    Blue Ball & Blocks
    New version, even for those who didn't like the concept I recommend to check out CNZ4. :)

    - some bugfixes (primarily collision)
    - new zone CPZ (see below)
    - added larger 32x32 block object that doesn't fall into pieces
    - four new stages (CPZ 1&2, CNZ3 [not quite pleased with it], CNZ 4 as boss stage)
    - slight edit of existing stages

    [​IMG] [​IMG]
    I wonder whether anyone recognizes these graphics...

    [​IMG]
    Sprite done by Oppolo according to the sprite sheet.

    Screenshots of CNZ4 tomorrow. EDIT:
    [​IMG] [​IMG]

    Still playing without sound, so no significant changes there.

    Download link
     
Thread Status:
Not open for further replies.