Rendering smooth arcs
-
here is the current situation . I am working on a top-down car game. and I wanted to implement skid marks .. similar skid to the ones found in absolute drift
here is some of the approaches I can think of and their pros and cons :
1- use short FlxSprites to form the skid marks and continuously draw them while the car is moving.
pros : easy to implement, and you can easily delete sprites after a certain amount of time.
cons : looks ragged and unrealistic. it also doesn't seems memory-efficient at all.2- make a level-size FlxSprite and stamp short skid-marks in it
pros : fairly easy to implement and much more efficient.
cons : you lose control over individual sprites so they can't fade after a while, also it still doesn't look smooth.3- make a level-size FlxSprite and draw curves on it using the
drawCurve()
function
pros : should look a lot better than previous solutions .
cons : I have no idea how to set the control point to formulate the curve, also I still have no control over individual pieces so I can't make it fade after a while .so my question is whether there are better solution to draw skid marks other than those mentioned above or how to overcome the deficiencies for any of the solutions mentioned above.
-
I guess your best bed would be using trail effect. We've got some trail addons but only FlxTrailArea has a demo.
-
yeah I think too FlxTrail will help you out.