I wanted to know how one would implement this motion blur or fade effect behind the soccer ball .

Here is what I was thinking . You have the balls current position and you also keep its previous position(couple of sec back). and you draw a "streak" sprite between the 2 points.

I have seen this effect lots of time implemented for projectiles in various 2d games and wanted to know if there is a standard technique.

enter image description here


2 Answers 2


That looks more like a trail than motion blur. Here's how you can achieve that:

  1. Have a small transparent image with a white, isosceles triangle on it.
  2. Draw this image stretched ( proportionally with the ball's speed ), rotated along the ball's direction.
  3. Draw the ball on top of it ( so that it hides the triangle's base )

Here's an image to help you understand:

trail effect

Of course, you trail doesn't have to be a triangle. It can be an isosceles trapezoid. It can also have a lower alpha so it blends with the background. It can even have a gradient alpha to fade away from the base.

This method is easy to implement, is parametrized by direction and velocity, and it's highly customizable. You can get almost any effect you want with it.

  • 1
    \$\begingroup\$ To be fair, if he had said he wanted to know how to implement streaking in a sports game (instead of motion blur), it might have gotten some NSFW answers. :) \$\endgroup\$ Commented Nov 19, 2012 at 17:52

One way is to have a intermediate bitmap for the motion blur. At start of frame it's replaced and old motionblur bitmap is rendered in it with a little less opacity.

All objects that need to have motion blur have some wrapper that catches the rendering of object and transfers it to this bitmap at full opacity.

At end of frame the motion blur bitmap is rendered to screen.

This is not exactly the method your example seems to use though, and it doesn't seem to use real blur but some cheaper technique.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .