Page 1 of 1

Trails

Posted: Sat Jan 10, 2009 4:02 pm
by Kjell
Hi guys,

Although I'm pretty sure I already posted a similar example before ( could have been wireframe only though ), let me put together a simple solid trail example .. give me a couple of minutes :) I did have this "Samurai" variant lying around though.

K

Posted: Sat Jan 10, 2009 4:21 pm
by Kjell
Voila ( updated )

sweetness

Posted: Sun Jan 11, 2009 4:45 pm
by jph_wacheski
Yeah,. that's the ticket!

This will be some fun to play around with,. the 'samurai' example is quite nice! Are you going to do a hack'n slash game?! :shock:
I am sure we can design loads of variants on this kind of poly ribbon type effect,. big huge thanks again for helping with another math/logic puzzle.

You roc Kjell!

Posted: Sun Jan 11, 2009 6:56 pm
by Kjell
:?

I noticed that both examples don't run exactly as they should on every system. Might have to do with differences in framerate, or even video cards. If you want to take the safe route, instead of writing off the "new" value at the incremented index, push all array values down a cell so the newest value always resides at [0]. That way you don't have to do any trickery in the Render Component ( although it is a slightly slower approach ).

Here's what it should look like.

K

Posted: Mon Jan 12, 2009 2:58 pm
by VilleK
Very nice effect Kjell!

I also noticed it looked strange sometimes. After lots of debugging I found the problem. There is a problem in 1.9.5b where comparing integer values do not behave correctly.

In your render-expression:

if(TrailIndex < 0) TrailIndex += Mouse.SizeDim1-1;

TrailIndex and 0 are integers so the "(TrailIndex < 0)" is the problem. It seems to work most times on Windows anyway, but when trying it on Linux it crashed. I will fix this as soon as I can.