• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] How to put bobbing effect smoother into pokemon icons?

WolfPP

Spriter/ Pixel Artist
  • 1,297
    Posts
    6
    Years
    Would anyone know how to make this "bobbing" effect smoother to pokemon icon, as we have in Pokemon PR?

    [PokeCommunity.com] How to put bobbing effect smoother into pokemon icons?


    Thank you!
     
    Longer, more detailed animation, presumably.

    Current bob in essentials is literally just cycling between a sprite and another one pixel higher/lower than it
     
    Last edited:
    Oh, do you have some tutorial than teach how to use 'Math.sin'?

    Math.sin is just the trigonometric function sine. Like a sine wave. Here's a link to Wikipedia on sine waves. This one's a link to the actual trig function (also Wikipedia).
    It's in radians. You can also use Math.cos. It's a wave like sin, but offset so at 0, you get +1 instead of 0.
    Here's the RGSS docs page on the Math Module.

    So I haven't gotten a chance to edit the scripts to make a ruby example for you. I do have some ugly Java code from a completely different project, drawing the pokemon icon at x=28 and y=32 + sin(framecount/2)
    Code:
    drawpanel.drawImage(activepkmn,28, 32+((int)Math.round(Math.sin(frameTime/2.0))));
    [PokeCommunity.com] How to put bobbing effect smoother into pokemon icons?
    But like play with the numbers in a graphing calculator or something. I ever really bothered to make the bounce very fancy.
     
    Back
    Top