@manucorporat I agree with Stepan. The community will improve it ;)
New AWMotionStreak. 10x faster, one draw call, no artifacts(118 posts) (50 voices)
Anyone know how to add catmull rom to this? So we can draw smoother lines? I've been trying for ages but im missing something in the update. Cause when drawing, it'll have a "delay" (you draw, but the points being drawn appear later).
@manu, the motion streak is somehow rendered not like the original streak texture. In the original CCMotionStreak I can render streak look exactly like the origin using color:ccc4(255,255,255,255) but I can't get same effect with color:ccc3(255,255,255) in your version, any trick here?
BTW: your version cause crash if a CCMotionStreak is made child of a node and later on the node is release on the fly. I don't know exactly what it is but when I change the way you schedule update callback it works fine again. Below is the original schedule:
// update ribbon position. Use schedule:interval and not scheduleUpdated. issue #1075 [self schedule:@selector(update:) interval:0];
The github link isn't working for me?
New motion streak integrated into gles20 branch!
how i can install this?
i try uninstall cocos2d ->
download from https://github.com/cocos2d/cocos2d-iphone/tree/gles20 ->
and install -f-u ->
create new project cocos2d i.0.0 ->
but error spot !!
error: 'shaderProgram_' undeclared (first use in this function)
error: /kazmath/GL/matrix.h: No such file or directory
and more error!!! CCMotionStreak.h.m not changed.....
i use xcode 3 and cocos2d 1.0.0 plz help me
manucorporat's New AWMotionStreak support Xcode 3?
You can compile cocos2d with Xcode 3, but the gles20's templates only support Xcode 4
i use manu's with xcode 3
but how to explain LAZER? like manu's screen shout?
is it need special image??
where is awVertexLinesToPolygons()? i cant find it!!
the page 2 link is wrong file......
i download from manu's github page....
and add more 2 files and delete 2 file... then build success!!
somebody be careful it..
How to use ccVertexesLineToPolygon()?
its just use only in CCMotionStreak.m?
we just use like that?
CCMotionStreak *streak = [CCMotionStreak streakWithFade:0.5 minSeg:3 width:10 color:ccc3(255, 255, 255) image:@"whiteDot.png"];
i wanna LAZER like a manus image...
I'm also having the same problem as others in the thread and I didn't see a solution. I'm only seeing one segment rendering at a time. So basically a one pixel tall line of my image.
I noticed this implementation doesn't have a length property. So is this not possible with this implementation?
On page3 @juulie mentions only drawing one line segment which sounds related.
With my tests it seems to just streak the image and doesn't seem to support the length implementation used in cocos 1.0 where it shows more of the image and allows for a distance before the image is drawn again.
Just saw this thread, and I would really like to try out this "new" motionstreak class. What I can understand is that it can make many different types of streaks, including streaks that have no gap between the textures and it is faster, but I kind of got lost in this thread and can not figure out what the status of this class is.
Is it committed to cocos2d-iphone version what? Or do I have to get it separately? Does it only support OpenGL ES 2.0 and thus not the cocos2d v1 branch?
I'd like to confirm... The glowing-line effect seen in the screenshot of the first post is a result of just a specific texture, or do you have more going on than the default
AWMotionStreak? For example, different blending options, a different fragment shader, etc?
I've been messing around with trying to create a similar glow-effect (different purpose), and haven't come close to anything that looks acceptable. If I layer three streaks ontop of each other with an additive blend, you get an okay-ish looking glow effect, but it's not nearly as nice as the one in your screenshot.
I've also noticed that on sharp(ish) corners the streak looks awfuly bad, and when a streak crosses over itself it's blended into a very ugly intersection, unlike in your image where it's clearly layered.
How do you define a repeating texture?
color:ccWHITE image:@"trail.png" - only adds the image once at the start, no repeat
streak.texture = newTexture; - same result here.
From my experience, small textures don't appear to work. 64x64px sized textures seem to work the best, like the built-in streak.png texture.
I also have the same problem, just one segment is added, and the rest is rendered with the configured color. Hope this bug is fixed in the final version!
Here is the link of the new topic.
I´m very interested to get the streak working properly for the game that I´ve been developing.
hey pal, Thanks for the post. It was really help full. But the problem im facing is, when i add the motionstreak the texture size is very small and its not rendering continuously. its just appearing only once when the touch begans. I want a complete movement of streak till my touch ends.
K.KarthikPosted 9 months ago #
Does anyone know if it's possible to render a repeated texture using CCMotionStreak 2.0 rather than just rendering one texture across the whole streak? I'm trying to replicate the effect from CCRibbon.
Jay.Posted 9 months ago #
Nice Resource and everything is working just fine in my game. The only problem im facing is to disappear the points when character reaches. i want to fade the points according to my character's movement. In update this condition is fading my points "pointState_[i]-=delta;". But how to fade when my character passed that point.
K.KarthikPosted 8 months ago #
Does anyone have an example of the texture they use for the motion streak?
I don't know if I'm not drawing it right or it's just not working.. I'm not getting what I want. Are there any sizes I need to follow like the texture being a power of 2?
I'm trying to apply a motionstreak to stars (in space) when the player accelerates, so sorta like the effect you see in Star Wars when they warp.
I'm using the latest Cocos2d 2.1 betaPosted 7 months ago #
You must log in to post.