Hi,
I'm using MotionStreaks for an animation, is only a line but in the simulator the line show alpha at end and looks great, but in the iPhone no, is only the line.
Some ideas?
Thanks.
Sorry my bad english.
Juan Pablo.
A fast, easy to use, free, and community supported 2D game engine
Hi,
I'm using MotionStreaks for an animation, is only a line but in the simulator the line show alpha at end and looks great, but in the iPhone no, is only the line.
Some ideas?
Thanks.
Sorry my bad english.
Juan Pablo.
Juan, your English is good. Yeah, the simulator and the iPhone have different graphic chips and some OpenGL drawing (especially with lines it seems) is different. I havent used MotionStreaks, so I cant comment on that. But its a function of the hardware - you arent doing something wrong.
I wrote motion streak so I might be able to answer your question. Last I checked the results were the same on both the simulator and the iphone (1st gen), but I haven't used it in a bit so things might have changed. Motion Streak constructs a polygonal ribbon behind your target object, so it doesn't use lines for drawing. It should fade the trailing edge of the streak out as it emits.
Can you provide more details of whats wrong, a screenshot or the code your using to initialize the streak?
Here is mi code
streak = [MotionStreak streakWithFade:1.1 minSeg:2 image:@"streak.png" width:6 length:5 color:0xFFFFFF];
[self addChild:streak];
[self schedule:@selector(onUpdate:)];
I have a linePoint Sprite and I play an action, then onUpdate i do
-(void)onUpdate:(ccTime)delta {
[streak setPosition:ccp(linePoint.position.x, linePoint.position.y+3)];
}
One thing that could be different is that your .png has alpha premultiplied on the device, but not on the simulator.
try converting your .png image to .gif
Now is working, no diference between simulator and device.
Thanks
juanpare/riq - I'm interested in motion streak and I was wondering if you could give some pointers/code as to how to implement.
Thanks
Did you take a look at the example code that is shipped with cocos2d?
Sorry for the obvious question :)
In previus post is the code I use, the only difference is the streak.png, now is .gif.
And I follow the code in the example like Patrick recomend.
This is my first post :)
I successfully got the motionStreak to work on the iphone4 and the simulator but it doesn't seem to work for the iphone 3g. I tried changing the .png format to .gif but it still doesn't work on the iphone 3g. Is the iphone 3g not compatible with motionStreak? Thanks in advance.
Nvrmind, problem solved. Works perfect on all devices with no slow down on the fps. Couldn't find out what was wrong with my code but it was definitely something i did.
You must log in to post.