while trying to port this tutorial (http://www.raywenderlich.com/3611/how-to-make-a-space-shooter-iphone-game) to cocos-x, I encountered a bug with particles.
I tried using cocos2D to check if it’s a bug from the example or in cocos-x and it seems it’s a cocos-x bug. The bug occurs with iOS version, and win32 as well.
By simply doing this modification to the default template, the bug occurs:
- Add the provided Stars1.plist file (attached) to your project
- Remove every childs from the default template (Hello World text, and any menu item)
- Add the following code in the Layer’s init method
CCParticleSystemQuad starsEffect = ;
CCParticleSystemQuadstarsEffect = CCParticleSystemQuad::particleWithFile(“Stars1.plist”);
Maybe I’m missing something, but using cocos-x there is nothing displayed on the screen, while with cocos2D you can see star particles flying from the right to the left of the screen.
I tried to debug the frame draw call, the GL seems to be called correctly but I don’t fully (yet) understand glES, so I might be missing something obious.
Anyway, if I missused the CCParticleSystemQuad class, please enlight me, otherwise maybe someone can open a bug in the tracker.
Stars1.plist.zip (1.1 KB)