don't click here

Amy In Sonic 1

Discussion in 'Engineering & Reverse Engineering' started by E-122-Psi, Feb 28, 2010.

  1. ICEknight

    ICEknight

    Researcher Researcher
    Wouldn't it be possible to make it just decrease by half (or 1/3) if it's not equal to 0, instead of resetting it?
     
  2. Selbi

    Selbi

    The Euphonic Mess Member
    1,529
    142
    43
    Northern Germany
    Sonic ERaZor
  3. Solaris Paradox

    Solaris Paradox

    Member
    2,456
    0
    0
    On my butt in front of the computer. Where else?
    I'm working on working up the willpower to work on learning how to make my own Sonic fangames. Not quite there yet.
    I just set it to public so you could see it. I didn't know there was a limit to the number of viewers... grr...

    Anyway...



    WEEEEE!!! :specialed:
    (Yeah, I had a bit too much fun trying to bounce around on the bumpers...)
     
  4. RedStripedShoes

    RedStripedShoes

    And I'm gone again. Member
    You obviously don't know much about floating point numbers in code.

    :eng101: FACT: It is impossible for computers to accurately represent any number that cannot be defined in terms of m/(2^n), where m and n are integers. This leads to such oddities (well, odd to us humans who think in the base-10 system) such as being easier to multiply by 43 and divide by 128 (43/128 is approx. 0.336) than to simply divide by 3.
     
  5. E-122-Psi

    E-122-Psi

    Member
    2,536
    729
    93
    Yeesh, you like rubbing a mistake into my head for over a minute, don't ya? :v:

    If it helps here is what branches I made in the code to crouch:

    Code (Text):
    1. loc_13392:
    2.         cmpi.w    #$80,d0    ; is Sonic moving at $80 speed or faster?
    3.         bcs.s    Obj01_NoRoll; if not, branch
    4.         move.b    ($FFFFF602).w,d0
    5.         andi.b    #$C,d0    ; is left/right    being pressed?
    6.         bne.s    Obj01_NoRoll; if yes, branch
    7.         btst    #1,($FFFFF602).w; is down being pressed?
    8.         bne.s    Duck_Movement; if yes, branch
    9.  
    10. .....
    11.  
    12. Obj01_NoRoll:
    13.         rts
    14. .....
    15.  
    16. Duck_Movement:
    17.  
    18.         tst.w    $14(a0)    ; is Sonic moving?
    19.         beq.s    Duck_Movement_Return; if not, branch
    20.         move.b    #8,$1C(a0); use "ducking"    animation
    21.         move.w    #0,$14(a0); stop Sonic moving
    22.         move.w    #0,$10(a0)
    23.         move.w    #0,$12(a0)
    24.  
    25. Duck_Movement_Return:
    26.         rts    
    27. ; End of function Sonic_Roll
     
  6. Solaris Paradox

    Solaris Paradox

    Member
    2,456
    0
    0
    On my butt in front of the computer. Where else?
    I'm working on working up the willpower to work on learning how to make my own Sonic fangames. Not quite there yet.
    Well, now it's up to someone who knows how to read that gibberish to chime in, as I'm not exactly the sharpest card in the stack. :flunked:
     
  7. Selbi

    Selbi

    The Euphonic Mess Member
    1,529
    142
    43
    Northern Germany
    Sonic ERaZor
    First off, why would you clear the Y-speed ($12(a0))? Isn't it supposed to simply stop you moving forward, backwards? :eng101:

    But anyway, what I would do is simply if the angle is in a specific area. The SST for this is $26(a0). To explain this: If it's $00, you are on a completly normal ground. If it's the half filled, $80, you are completly upside-down, like if you are in the top point of a looping. Anything else goes by steps of $20 when it comes to select the correct rotated sprite, except for the basic one, which is from -$10 to $10, since this goes also for the other way if you are walking in the other direction. I'm not sure, but I don't think that matters anyway, so I would do something like this:
    Code (ASM):
    1.         moveq   #0,d1       ; make sure d1 is empty
    2.         move.b  $26(a0),d1  ; move angle to d1
    3.         bpl.s   AngelPositive   ; is angle positive? if yes, branch
    4.         neg.b   d1      ; otherwise negate it (e.g. change it from -$10 to $10)
    5.  
    6. AngelPositive:
    7.         cmpi.b  #$10,d1     ; is angle within -$10 and $10?
    8.         bgt.s   AngleToGreat    ; if not, branch
    9.         ; otherwise do halt move stuff
    10.  
    11. AngleToGreat:
    12.         rts         ; return
     
  8. E-122-Psi

    E-122-Psi

    Member
    2,536
    729
    93

    Oopsie.

    Okay then, do I just add this coding on the bottom of the croutch coding?
     
  9. Selbi

    Selbi

    The Euphonic Mess Member
    1,529
    142
    43
    Northern Germany
    Sonic ERaZor
    I thought it would be clear with the:
    Code (ASM):
    1.         ; otherwise do halt move stuff
    =P

    So it should look like this:
    Code (ASM):
    1. Duck_Movement:
    2.         moveq   #0,d1       ; make sure d1 is empty
    3.         move.b  $26(a0),d1  ; move angle to d1
    4.         bpl.s   AngelPositive   ; is angle positive? if yes, branch
    5.         neg.b   d1      ; otherwise negate it (e.g. change it from -$10 to $10)
    6.  
    7. AngelPositive:
    8.         cmpi.b  #$10,d1     ; is angle within -$10 and $10?
    9.         bgt.s   AngleToGreat    ; if not, branch
    10.         tst.w   $14(a0)     ; is Sonic moving?
    11.         beq.s   Duck_Movement_Return; if not, branch
    12.         move.b  #8,$1C(a0)  ; use "ducking" animation
    13.         move.w  #0,$14(a0)  ; stop Sonic moving (interia)
    14.         move.w  #0,$10(a0)  ; stop Sonic moving (X-speed)
    15.     ;   move.w  #0,$12(a0)  ; nobody needs this goddamn line
    16.  
    17. AngleToGreat:
    18.         rts         ; return
    19.  
    20.  
    21. Duck_Movement_Return:
    22.         rts
    23. ; End of function Sonic_Roll
    24.  
    This should do it.
     
  10. E-122-Psi

    E-122-Psi

    Member
    2,536
    729
    93
    :flunked:

    Well anyway, inserted it, it still occurs but only when on that small part of 180 rotated pathway.

    I've also managed to fix up the leap move underwater. I think I may have also fixed the bug that caused it to freeze on real hardware (it works on a PS2 emulator now while originally it froze up in a similar manner). A new bug has occured however that assigning the hammer move to hit the MZ blocks causes Amy to break them just by touching them, this seems to occur only when I assign the hammer attack and only with the MZ blocks in particular. My guess is that I've f***ed up the hammer code in some manner, I just can't figure out where.

    Oh, another thing. Do you guys think the Sally hack should have similar physics to Amy, eg. croutch anywhere?
     
  11. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    I think it would be nice if you implement it on your Sally hack too, and I'm glad you're continuining working on it as well
     
  12. Selbi

    Selbi

    The Euphonic Mess Member
    1,529
    142
    43
    Northern Germany
    Sonic ERaZor
    I swear, I tried this code with rolling, and it worked like charm. At first I thought it's a problem about bytes and words, since it says for words on the wiki, but I used bytes as well and it worked. I'm completly lost and have no idea what to do, sorry. :(

    On the hammer code problem, could it be that you used .w instead of .b on some points? Like so:
    Code (ASM):
    1.         tst.w   ($FFFFFFA7).w   ; is flag set?
    You may or may not see that this is an odd value, because it ends with 7. But you can also see that it's testing for a word. This doesn't work on real hardware and some emulators. You wanna change either the .w to .b or you use an even value (like $FFFFFFA6).

    And to Sally, I don't think that it's a good idea, well at least not when it comes to simlilarity. The originalty would get lost, which is why I think you should make unique moves for her (what about a duckwalk while crouching? Not that would make any sense, but just to have something =P).
     
  13. FeliciaVal

    FeliciaVal

    Member
    693
    11
    18
    Spain
    aw well now that you mention it you're right, my bad then ^^U
     
  14. E-122-Psi

    E-122-Psi

    Member
    2,536
    729
    93
    Well rolling and crouching may work differently (it's an branch off Sonic_Roll but is based on Sonic_Duck's action programming). As said it only happens on that slight bit of directly upside down platform.

    Hmm, a crawl may be an interesting action to pull off, might try that out, I just thought certain actions of Amy's may work for Sally since she doesn't have roll mechanics like Sonic and the others (I personally see her as a sort of stealth type so it would make sense for her to have flexibilities like crouching anywhere), not all of them however, I can understand that, I would certainly want Sally to be unique in some manner. By the way what do people think of this as an alternate attack animation?:

    [​IMG]

    The laser blast is a placeholder so don't bother too much about that. It might be interesting to give her a projectile of sorts, though I'll 'baby step' right now.
     
  15. Selbi

    Selbi

    The Euphonic Mess Member
    1,529
    142
    43
    Northern Germany
    Sonic ERaZor
    I give up on the current issue for now, no idea what I'm doing wrong or how your code works so different. =/

    So something like Tweaker's blaster in DWEA? :specialed:
    Brilliant, but make sure it would be somewhat original, so it's not something like idea stealing. =P
    Also, it seems like there is a short delay before the ball gets fired. This looks cool and realistic and stuff, but could be somewhat annoying. I'm requesting to either remove the delay or make it shorter, so you don't really feel it.
     
  16. E-122-Psi

    E-122-Psi

    Member
    2,536
    729
    93
    You've done more than enough anyway.

    Well it's not as if Tweaker didn't have some subtle inspiration too... :v:

    This would work kinda differently anyway, rather than multiple blasts, Sally has to stand still to fire (outside jumping), the projectile would more a little boost to her attack to compensate for lack of mobility while using it.

    Here's a refinement to the animation with less frames. May also retool it so Sally looks less 'clutzy' while performing it:

    [​IMG]
     
  17. Solaris Paradox

    Solaris Paradox

    Member
    2,456
    0
    0
    On my butt in front of the computer. Where else?
    I'm working on working up the willpower to work on learning how to make my own Sonic fangames. Not quite there yet.
    Looks cool. The delay could be an issue, yeah, though not as much if it's an actual projectile.

    (Sonic gameplay with Mega-Man-like projectiles... hm...)

    Also, regarding Sally and crouch/roll mechanics, could that "stealth-type" aspect perhaps shine through in a kind of Solid Snake type roll move, maybe acting as her own little momentum-dash move to be used from a standing position, or something? Or maybe she could tumble-roll while running as a momentum-breaking ability...?
     
  18. Willie

    Willie

    Each day the world turns Laugh 'til it all burns Member
    I just played the hack. The custom graphics are extremely well done and I had a lot of fun playing it. I how playing as Amy gave her some serious advantages and some big disadvantages. IMO, acts 1 and 2 of Scrap Brain Zone were much easier as Amy. Even though I have probably played this game from start to finish over fifteen times, I was able to go to some areas in the game I've never been to before. >_> Also, cutest Sonic rom MOD ever. ^_^
     
  19. E-122-Psi

    E-122-Psi

    Member
    2,536
    729
    93
    My hopes was to make a character hack whose abilities make playing the game seem new so that is nice to here. Thanx.

    Some sort of accelleration ability may help with Sal, similar to the spin dash/peel out or Amy's leap, I'll try experimenting with a move that would befit her abilities, a roll may work, so long as it is differenciated enough from a normal Sonic roll.

    That tutorial confuses me. There are no loc2_1AD78 branches in the Sonic 1 asm.

    [​IMG]

    Special thanx to MarkeyJester again.
     
  20. Selbi

    Selbi

    The Euphonic Mess Member
    1,529
    142
    43
    Northern Germany
    Sonic ERaZor
    That's because this thing was originally made for the spindash, and you don't have it. Simply start the guide where it says Then go to Sonic_LookUp and change.

    About the picture, looks nice, but I'd like to see the emblem a little bit to the lower, like it is in S2K. The banner kinda looks like it tries to make Sally getting ignored, if you get what I mean.