Jump to content
Banner by ~ Ice Princess Silky

Rikifive

Support
  • Posts

    3,457
  • Joined

  • Last visited

Everything posted by Rikifive

  1. Hello, hi! This drawing is so amazing! So adorable! Oh I sooo love it! Is it yours? Welcome back to the herd!
  2. Hello there! Welcome to the herd!
  3. At least I have refreshed my memory a little. Thank you!
  4. Some time ago I've posted this and said, that I'm 99% sure, that I'm making things necessarily more complicated than they should...

    And yes, that was true!

    I was thinking about this before, but didn't bother to actually check that out.
    However, soon after I've decided to take a closer look at that and it turns out, that it's a much more efficient way to achieve what I wanted.
    That way being using sine waves.

    For some testing I've created a thingie, that draws the waves, so brace yourselves, I present you the SINE SIMULATOR 2018! (also supports other functions, but who cares) :D 

    F5ZgeOf.gif

    9IZAaBx.gif

     

    This started to get big, so I've decided to create a blog and put the walls of text there. :D Sooo for more information, please visit the recently revealed hideout in the pink forest. (my silly blog, that is) :D 

    1. Fluttershy Friend

      Fluttershy Friend

      Oh! I guess that it is your heart's working diagram! So it seems that you are alive!:D

    2. Rikifive

      Rikifive

      Hah yeah, I'm still alive.. ^_^

    3. HereComesTom

      HereComesTom

      I know the feeling :)

      I forget what it was I ended up using sine and cosine for with my own fangame---maybe it was the positions the rainbow elemental boss enemy would have as it sort-of-orbited around.

  5. Hiiii there! Yeah, I can already tell, that MLP has some nostalgic feeling for me. Almost 3 years, I miss my first days with these.. um.. ponies. Greetings from Poland and welcome back to the herd!
  6. Rikifive

    Hi

    Hello there! Programming? What kind of things? I could help you with Polish if you'd like to Welcome to the herd!
  7. I'm pretty sure nothing interesting will be to see here, but everypony is of course welcomed!
  8. And the blog starts with maths... Shush, I have no idea how to blog! *ahem* Welcome class! It's time for your favorite thing! MATHS! Isn't that awesome!? It's like the number one thing! Get it? Number...? ONE..? Maths??? No? Alright then, let's get to the lesson! Run away while you can. Joking aside~~ So yeah, some time ago I've posted a status update mentioning some maths to achieve this effect: Long story short; I wanted a formula, that raises as gets closer to a certain point, then decreases along with the distance. The first thing, that came to my mind was a quadratic function, because their graphs seemed to be similar to what I was looking for. You may have seen these parabolas, where it was raising to some point, then going down. Just by that image my mind suggested me something... "Hey, what if the top of the parabola would be the center and then the value would be decreasing the further it goes from that point? Wouldn't be that what you're looking for?" And I was like "Yeah! That should work!" Even though I was thinking of some other possibilities, that would be even better (we'll get to this later), I decided to stick to my very first thought. (silly me, told ya I tend to unnecessarily make things more complex than they should ) So I've started thinking of a formula, that would do what I want and after some time I came up with this: >>> Putting into game... What this formula does is to get the "Y" value from the function based on the icon position. So point x=38 on the graph is where I want to put icons. Now I'd like to give them a smooth floating animation. To do that, I've decided to move them up and down by up to 6 pixels away from the center. It could be achieved in a really simple way, like move it up with a constant speed, then bounce it back and forth, with the same speed. Heh, that's actually what I did in my previous design ages ago... That doesn't look bad, that's true. Thanks to very low distance (6 pixels in total; 3 from center), it's not really noticeable. It's just few pixels up/down after all. Now that I'm working with a larger resolution, it would be nice to make it actually smooth and that's what the formula does. As you can see, the further the icons move from the center (x=38 on graph) the lower the value gets, which is what I needed. So I've used that fancy calculation then moved the icons by the returned amount, eventually changing their direction when getting far enough. That was a success. The formula did exactly what I wanted. However, there was a much simpler and more automatic way to achieve this. There is a similar graph, but instead of parabola, there's a wave. Now since the wave doesn't end and goes up/down through positive and negative values all by its own, it could be easily used to replace a pretty big chunk of code. Now guess what that wave is... Have you ever heard of sines? Sounds like another silly thing to learn during math classes, but turns out these actually have some usage! It pretty much follows the same idea- The horizontal line showing point 0 would be the center. Now as seen in the graph, it goes up and down with time. At this point I could forget about the previous 'if' statements and all that stuff and just use the time and some maths of course. I wanted to see how it all behaves in the software I use, so for some testing I've created a thingie, that draws the waves based on thrown formula, so brace yourselves, I present you the SINE SIMULATOR 2018! (also supports other functions, but who cares) Let's try the simplest one- the one shown in the image above. Oh that's sooooooo coooool! It lacks of ponies though, I should have put some... Everything works. Also some other example (suggested by fellow developer in chat) -{ Uuuuuh fancy! ) I know, right? Still lacks of ponies though, perhaps in future updates of that useless program-thingie... Okay, so all I had to do was to follow the damn train, CJ - not this again, my bad! --- Was to use these values for the icons. For that, I came up with a pretty much the same formula as before, but using sines this time. icon[i].y = 38 + 6 * sin(icon[i].timer); icon[i].timer += 0.05 So basically: 38 - is the center 6 - is the amplitude - the maximum distance they can travel from the center and then the timer (0.05) - basically represents the x position increment in each frame - the higher the value, the faster it goes. So yeah, the code has been shrunk to only two lines and it gives an extremely accurate result! The only one question is... Why did I waste the whole weekend on toying with this! Such a relatively simple thing, a tiny piece of code, yet I had to do science for hours anyways... Well, either way... And with that being said, you're free to go now! If you haven't run away already.
  9. I've decided to create a blog, where I'll be posting some things, that I'd like to keep for future reference. So yeah, you may find some irrelevant science in here and probably something else.
  10. So I've made this...
    8HRdafz.gif

    I took me way longer than I expected, because... I'm 99% sure, that I'm making things necessarily more complicated than they should... :love:

    I mean, I could manually program how they should move- set the delays/speed based on their distance from the center, thus have full control on every pixel on their way, as simple as that, but no... I wanted to make it automatic and fit it into one line of code*... :muffins: To do that, I had to come up with a formula, that raises towards the center and goes near 0 on the edges. ...And guess what... As soon as I started thinking of a possible formula, quadratic functions were the thing that came to my mind. :P

    jsucCC1.png
    >>> Putting into game...
    WTtzCGj.png
    * - the one line of code mentioned before refers to the part highlighted in blue. The manual way I've mentioned would require multiple lines of code with another if statements and such.

    Hah, I think it's actually the very first time in my entire life, where I had some use of the quadratic functions besides school. :lol: 
    I kept asking teachers why do I need all of that stuff in my life - never got a satisfying answer.. But it seems, that I'm slowly figuring that out by myself. :fluttershy:

    jqpdJjI.png

    1. Show previous comments  11 more
    2. Fluttershy Friend

      Fluttershy Friend

      Quote

      Basically all you need to know is what the graph is showing.

      And this is just a problem.:toldya:

      Quote

       If that would make things any better, I've made one in Polish for you. :) 

      I really appreciate this friend but....uhm...you see...but..... 162.thumb.png.1b6be155afa8babc6dc9b31bff707ab8.png

      it's still not working. :D

       

    3. Barpy

      Barpy

      Hehe thats cool :D 

    4. Rikifive

      Rikifive

      @Sparklefan1234 Perhaps? :D

      @Fluttershy Friend Well, no worries either way. ;) 

      @Barpy OOOH THAT'S SOOOO CO OO OO OO OOL! :love: Just kidding, thank you! ^_^ 

  11. Yeah, it is slightly inconvenient. This was reported some time ago, so for more information, visit this thread: Could you provide more information? What exactly happens or doesn't work? My first tip would be using the spoiler button from the toolbar, instead of putting BBCode, if you happen to put these that way, that is. Click that button while in spoiler to create another inside. For example, double click it.
  12. It's finally weekend! I hope you'll all have a great one! *boops @Fluttershy Friend @Alexshy @Sparklefan1234 @ChB @DashYoshi @Totally Lyra @Mesmelicious Rize and @Rarity the Supreme*
  13. HAPPY BIRTHDAY JERIC!!! :pinkie: 

  14. Hello there! You seem like a really friendly pony! Welcome ~back~ to the herd!
  15. Hello there! Welcome to the herd!
  16. Hello there! Welcome to the herd!
  17. Hello there! Welcome to the herd! /)
  18. Haha, for some reason this reminds me of one of the bosses from "Big Nose Freaks Out" from NES. *boops @Sparklefan1234*
  19. Hello there! I hope you'll have fun here! Welcome to the herd!
  20. Browsing old files... :icwudt:
    Found this silly pixel art of mine from years ago... :D

    M9EJpru.gif

    Oh this is just bad, no comment. :lol: 
    Memories... :icwudt:

    1. Show previous comments  4 more
    2. Totally Nyx

      Totally Nyx

      Wow, if that's bad I'd love to see what you call good. That's some great art! (and yes, I'm heavily biased toward pixel art :P)

    3. Rikifive

      Rikifive

      Oh c'mon, just look at the clouds! :D 
      Heh, joking aside, by looking at this I can see, how much I have improved my skills during the past few years, even though it's actually not much. :P I'm still pretty bad. :D 
      2,771 images (and counting) on my Imgur account hold a nice history of my activity and works through years. The last pages feel slightly nostalgic already... :kindness: Oh the time goes so fast..

       

      Thank you though! I posted that to laugh at this with you all, but .. happy to hear it's not that bad actually. :derp: 

    4. Fluttershy Friend

      Fluttershy Friend

      Well. Still good. Although this flowing forest....:D

  21. Hello there! Have fun and welcome to the herd!
×
×
  • Create New...