How would you implement the hearthstone flying particles? like you can see here These are not just simple particles flying from a to b... I think that they are flying in some random spline, and stretched...

Any information, even to something similar that you can point me to would help! Thanks

  • \$\begingroup\$ The term you're missing is "particle trails". Searching for that term and you'll find examples for every engine and implementation details. \$\endgroup\$ – Sirisian Aug 29 '17 at 23:50

It certainly looks like you could use splines to get similar paths. I fired up Krita & made a few to help illustrate some things that might help get you going.

enter image description here

The spline above goes from one corner to the opposite, passes through a somewhat central middle node. Note that the control handles that node are less than 45 degrees off from the angle between the end points, are symmetric in length & have lengths that fall within the bounding box of the end points.

Let's experiment with those parameters a bit. Here's what happens when we push the angle to about 135 degrees. Note that the shape gets a bit more of a pronounced S curve:

enter image description here

Next, let's push the controls outside the bounding box. Not that the S curve becomes even more exaggerated.

enter image description here

Finally, let's break the symmetry. In this final example, the lower handle barely escapes the bounding box, but the upper handle is about twice the length of the lower one. Of the four, this one probably has the most personality.

enter image description here

I recommend that you grab whatever graphics software you want that supports spline editing, make copies of a 'default' spline & edit them in different ways. You'll probably hit upon a couple of things that looks reasonable much faster than if you were going directly to your code. After you have a few promising recipes, try them out. Maybe try a few 'bad' ideas as well - sometimes things look different when animated. Either you'll happen upon some hidden gems, or you'll refine your sense of what's not going to work out.

  • 1
    \$\begingroup\$ Thanks for the detailed response, but as I mentioned in the question, spline is probably the way to go. The question is more about how would you use spline to do this? It looks like they draw something that not only follows the path, but stretch on it... \$\endgroup\$ – gilamran Aug 30 '17 at 9:21
  • \$\begingroup\$ Sorry I misunderstood. By stretching, are you referring to how the particle gets bigger towards the end of the path? \$\endgroup\$ – Pikalek Aug 30 '17 at 13:33
  • \$\begingroup\$ It's like a "snake" following the path \$\endgroup\$ – gilamran Aug 30 '17 at 14:05
  • \$\begingroup\$ If you're asking how to draw a particle that leaves a trail, the answer(s) depend heavily on what you're using. If you include more technical info in your question &/or tags (such as which language, SDK, engine, etc you're using), there's a chance I or someone else can give you a more technical answer. \$\endgroup\$ – Pikalek Aug 31 '17 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.