YesNoOk
avatar

Coding a Fishing Rod (Read 1169 times)

Started by Bane84, August 13, 2020, 06:15:43 am
Share this topic:
Coding a Fishing Rod
#1  August 13, 2020, 06:15:43 am
  • avatar
  • ***
  • Original characters are my forte.
    • http://network.mugenguild.com/bane84/


I already have a pretty good idea of how this move is going to work:
  • Input 1: Create a helper (hook) with initial X and Y velocities.  Gravity will affect the Y velocity throughout as the X velocity moves forward until it reaches the length of the fishing line at which point X velocity will equal 0 and Y velocity will continue to drop until the hook reaches the ground.
  • Input 2: The hook moves back a tiny bit as the player reels the line.
  • Input 3: The player decides to bring in the cast.  The hook will fly back to a designated position.
The difficulty I'm going to run into is trying to create "fishing line physics".  I wouldn't even know where to start with this.  My guess is it would have to be some sort of rotation/scaling with a single pixel, but aside from that I'm relatively stumped as to how I'm going to implement this.

Any ideas or references to another character that utilizes a similar sort of physics?
Last Edit: August 14, 2020, 04:22:53 pm by Bane84
Re: Coding a Fishing Rod
#2  August 13, 2020, 06:45:02 pm
  • *****
  • Shame on you!
    • USA
I was going to do this with my SSBB Samus. I started it, but mugen was getting all wonky. Especially for her air whip attempt.
Your best bet is to analyze the move in as many situations you can. Instead of trying to get things to float and land and adapt to what you want, just make THAT animation. If there's a second instance, make that animation, and figure out how to switch the animations.
Just looking at the animation on screen, it looks extremely similar to Omega Red's throw. Check out Cyanide's to see what he did.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Coding a Fishing Rod
#3  August 13, 2020, 10:40:11 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Oh god don't use omega for this. That was done via a lot of default animations and binding points. What you want is to go into the code library and find bias thread on bezier curves. Then use that to position single pixel explods along the line of calculation.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Coding a Fishing Rod
#4  August 14, 2020, 11:33:33 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
Then use that to position single pixel explods along the line of calculation.
Just be careful with these "single pixel explods", as you could easily hit the max threshold
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Coding a Fishing Rod
#5  August 14, 2020, 12:43:57 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Also a problem. Explods at least have a bigger limit than helpers. If you wanted something weird you could decide the animation never truly changes and make it at the maximum size then use angledraw to scale it down when in closer. Dunno how tthat would look but its an option.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Coding a Fishing Rod
#6  August 14, 2020, 04:22:48 pm
  • avatar
  • ***
  • Original characters are my forte.
    • http://network.mugenguild.com/bane84/
Thanks for the feedback.  I'll take a look at your suggestions.