don't click here

Proof of Concept: Homing Attack in Sonic 3 & Knuckles

Discussion in 'Engineering & Reverse Engineering' started by Aerolite, Dec 25, 2008.

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

    Aerolite

    Feel teh powah! Tech Member
    Hey guys, sorry for the delay in getting back here (and the bump), but I was a little longer in getting back from my trip than I'd hoped. My apologies. Also, thanks for the Tech rank guys, it was a nice surprise. :)

    Thanks to everyone who's tried it so far, and thanks for the comments. There are a few things I should address specifically, so I'll do it on a per-quote basis shall I?

    Yeah it does tend to make the game ridiculously easy, but my main concern was really just to get the HA ingame :P. I had planned on adding some homing gfx, but I just never really got to it. I may look into it however.

    Now that's an idea! For some reason it never entered my head to look into that, even though it's exactly how SA2 works. :psyduck: Definitely something I have to add. Thanks man :)

    Can you elaborate on 'stiff'? I'm not quite sure what you mean. Also, the jump dash is specifically coded to slow down after a bit, as that's how SA2's actually works if you look closely. It should also be noted that if the slowdown wasn't in place, you could pretty much jump dash at the start of a level and launch yourself to about the half-way point, which although novel, isn't really what I'm after :P. If it's really a big issue, I can take another look and re-compare it to SA2, but I think I've got it pretty good currently...

    While I can understand what you mean, I have specifically coded the HA to target any object that I feel would be targeted in SA2, if that makes any sense. I think the real reason for this issue is that SA2's levels were designed with the HA in mind, while S3K's obviously weren't, and as such there's been no auditing of the levels to fix such annoyances. What I can do however is toy with the HA's ranges a bit to try and minimize such issues. I'll put it on todo.
    On another note, you mentioned homing onto a rock. According to my code, the only way this could happen is if there was a targeted object underneath it, as the HA is not coded to target rocks specifically. However, if you have found a rock with nothing under it that's being targeted, please tell me which one it is exactly, and I'll look into it.

    Can you elaborate please? The only bug that I know of is that sometimes you'll go through a spring if you HA it at a specific angle. I've tested it very thoroughly and not found anything else, but if there are other bugs, please tell me and I'll try to fix. :) Also, I'm not sure what you mean by incomplete, I mean sure, I could add in some gfx, but other than that... I just need to know what you're referring too specifically. :)
    On another note, I really don't know what the future holds for my hacking of SK, as this was really only a spur-of-the-moment thing to challenge myself; I never really thought of doing anything more, but I may at some point. We'll see what happens.


    Whew.. I think that's everything. :v:
    I'm currently on another computer, so I can't do anything with the code for another couple of days, but I'll get to it asap. Also, I still intend to make a post outlining some small fixes for the SK disassembly that I came across in my coding, specifically audio and crash related stuff, so I'll get that up soon as well.

    Aerolite out.
     
  2. DimensionWarped

    DimensionWarped

    Erinaceous! Oldbie
    This is pretty damn cool and probably one of the best implementations of homing attack in 2D I've ever seen. One thing though you might consider addressing is that if Sonic does the homing attack (jump dash if you'd rather in this case) very close to the ground, he'll take off running like he'd just hit a spring. You might consider adding a means of checking when Sonic hits the ground during the homing attack that slows him down like it does in the air after so and so amount of time automatically when he hits the ground. I'm guessing the bubble shield would have some code that would help with that, but I don't know much about rom hacking to be perfectly honest.
     
  3. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Yeah, after a bit of looking, the rock I HA'd onto had a spring beneath it. Although, I know what you mean about the springs being targets in SA2... but how about only homing onto vertical springs? That way you aren't jumping/HAing over a horizontal spring, only to have your direction screwed up?


    Edit: The horizontal spring thing is the only reason my HA doesn't home onto springs in my hack.
     
  4. This is seriously awesome.

    Might I suggest porting it to Sonic 1 and/or Sonic 2?
     
  5. MDave

    MDave

    Head Ninja Member
    35
    0
    0
    North Wales
    BladeBattles - Indie PC game.
    Nicely done jump dash! I personally like how it decelerates, helps you keep in control. However I have a suggestion.

    If you do the jump dash while your running/jumping at a pretty fast speed, it should keep that momentum instead of slowing down to whatever the default value speed you have set after deceleration. So it doesn't feel like you've all of a sudden hit a gust of wind going against your current direction :v:

    Keep the behavior when your standing still or going at less speed then the speed you reach after deceleration :psyduck:
     
  6. Wow, you made it look better than SEGA did at the time. Sonic HAD the homing attack in Sonic 3 and Knuckles, BUT ONLY WHEN HE'S IN HYPER FORM. The one in that game had the jump dash (which could be performed in any direction, even down), and the actual attack, but he didn't bounce back up when he hit, he just went straight through whatever enemy he's aiming at. He also wasn't able to hit EVERYTHING with it. I just thought that this would be cool to mention, since it reminded me of this!
     
  7. Sciz

    Sciz

    Member
    189
    0
    0
    Hyper Sonic doesn't home in on anything, he just instantly wipes out all onscreen badniks.
     
  8. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    And dashes mid-air to the direction you are holding on your joypad; if you're not pressing any of the 8 directions, Hyper Sonic will dash forward.
     
  9. Seriously? Then I guess my game either glitched, something strange happened, or I just got lucky... :psyduck:
     
  10. Kurosan

    Kurosan

    Samurai of Gaming Oldbie
    Bingo. Don't worry, people here happen to know a lot about the games.
     
  11. Hey, thanks! It's good to know! It might have happened because I was using my old computer (made before 2000). It's sooooooo old, and causes more strange things to happen to other games. I thought that was a normal attack... but I'm wrong. I've got a new computer since then, I just haven't got all the Super Emeralds yet, so I haven't noticed any difference with Hyper Sonic (I DON'T HAVE HIM YET!). The glitch was pretty cool, but I can't get it since my old computer is...old. I had to throw it away. Ahhhh... good times. :psyduck: Only question is, how'd it happen?
     
  12. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    It didn't.

    You realize it's not a big deal that you made a mistake, right? You were corrected; no harm done. But please, don't try and lie about it—that is what will make you look bad, not mistaking the jump dash for a homing attack.
     
  13. Yeah, I probably pushed a button or something. I just assumed it was a glitch. Why? The game HAS acted up on my new computer too. Here's what happens. The game just goes completely nuts when I use it on my NEW computer. What happens is, I turn it on and the game just fast-forwards, but the music and sound remains the same... not kidding. I just assumed that something on my old computer caused it, and something strange happened while I had it as well. I'm sorry you thought I lied, I didn't mean to give you that assumption; I was just assuming my old computer screwed it up, like it did with a few other games I had, including Sonic 3d Blast. Honestly, I hit the button, and Sonic hits the enemy and kills it, not the flash, but the enemy was PROBABLY OFF-SCREEN. So, long story short, I HAVE NO CLUE WHAT HAPPENED! I'm trying to get Hyper Sonic, and see what caused it. In the meantime, I need to think about what I'm going to post before I post, so nothing like this happens again. So... SORRY! I feel like an idiot....
     
  14. muteKi

    muteKi

    Fuck it Member
    7,851
    131
    43
    Ah, S&K Collection for PC! I do believe that there's a patch for that issue that you're having with the game speed, though, as I recall, running the game in full-screen fixes that in most cases (game speed is sync'd to monitor frequency).
     
  15. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    You don't need that patch anyway. Just create a s3k.ini file in c:\windows with
    Code (Text):
    1. [debug]
    2. MukaiDropFrame=0
     
  16. Aerolite

    Aerolite

    Feel teh powah! Tech Member
    :) I think we've gone somewhat off-topic. Lets try and get back on, shall we?

    Thanks for the complement! :(
    Actually, this is supposed to happen, and I often rely on it when playing SA2 as a means of gaining a bit of speed quickly. The speed of it in my implementation could possibly be slowed slightly, but I dunno; I kinda like it how it is.

    Well I guess that'd be one solution, but I think I may have a better one: Upon making reference to SA2, I realized that the downward range of my HA is way more than it should be. See, in SA2, Sonic tends to only target objects that are only slightly below him, where's in my implementation, Sonic has the possibility of shooting down to an object which is more than a little beneath him. I believe by fixing the downward range this problem will be solved, however I'll give you're solution a try also to see which works better. :)

    Well like I said in the first post I originally wrote this for S2, and as such, that version was the base for this one. The S2 version is currently unreleased however, and that's how it's likely to stay unless there's high demand for it (which I doubt, as it's exactly the same code, only in S2 levels).

    Thanks!
    With your suggestion; this same issue was actually in the original SA2 version. Though I really like your idea, I now have to decide whether I want the HA as close as possible to the SA2 original, or if I want to implement this and change it :). I may try it, I may not. Thanks for the idea though :)
     
  17. Aw come on man, now I know there's a S2 version I HAVE to have it. Don't hold out on me man!
     
  18. Azu

    Azu

    I must be stupid. Member
    I suggest you change the button to "C". If you try this with the debug mode, sonic goes into anti gravity mode and doesn't home in.
     
  19. Compsense

    Compsense

    Member
    499
    0
    16
    NC, USA
    some dance album or summat
    Yes, please, I'd love to try playing Sonic 2 with the homing attack!

    Edit:
    Now, having actually played the hack, I think it's great, although I've been using it to gain speed on ground a lot :P. I think the only problem I've had with it, is that when you hit a spring from the wrong angle (like the sides of it), it doesn't send you in the spring's direction. I think a couple people noted this already, and although it's what the game was originally like that, if you could make it so you could hit a spring (and it sends you flying in the spring's direction) only when you use homing attack to hit it, that would be great! :colbert:
     
Thread Status:
Not open for further replies.