Game Development Community

Particles not appearing on iPhone, work fine in iTGB

by Brooks Talley · in iTorque 2D · 11/24/2009 (2:03 am) · 3 replies

I've got a test game with one particle effect (big_explosion from TGB). I have the particlesArt resource added to my iTGB project and it all works well launched from iTGB.

On the iPhone simulator the game works great, but the particle effect just never appears. No error messages in the GDB console. Then again, I'm not even seeing my debug "echo" statements in the GDB console, nor in console.log when run in the iPhone simulator, so maybe I'm missing some good debugging source.

I have the particle effect itself created using:
%explodeEffect = new t2dparticleeffect(explodeEffect) {
                scenegraph = %scene;
                effectFile = "~/data/particles/big_explosion.eff";
                size = "1 1";
                UsesPhysics = true;
                };
%obj.explodeEffect = %explodeEffect

Because the object in question is one of many, there's just that one particle effect created with the object. When it comes time to use the effect, I use:
%explosion = %obj.explodeEffect.cloneWithBehaviors();
                %explosion.scenegraph = %obj.scenegraph;
                %explosion.position = %impactPosition;
                %explosion.setEffectLifeMode("Kill", 1.0);
                %explosion.playEffect();

Any ideas? I've been googling and searching the forums for the past hour or two with no luck. The particle's position is positively not offscreen or outside the world.

#1
11/24/2009 (5:13 am)
can it find the eff file? i noticed my eff files were 1 kb, and the ones originally were 9kb. Check that the eff file is ok and that it loads properly. Also, did you add the debugger console output fix i posted recently?

http://www.garagegames.com/community/forums/viewthread/104091/1#comment-701799

Once you can see the output inside the XCode debugger console - you can get better errors i hope :)

Also, check the UsesPhysics = "1"; on the particles and effectors because they probably use the physics code to do work (and all items default to physics being off)
#2
11/24/2009 (2:06 pm)
When you say that you have the particlesArt art resource, you mean that you've manually loaded its images into your project right? The resource system isn't enabled for iTGB so that could be your problem. Otherwise, I would check the usePhysics value like Sven says, that's the usual culprit for images that work one way on the simulator and another way on the iphone.
#3
11/24/2009 (2:51 pm)
Hey Brooks, can you try this? Drag the particle from you editor to the middle of you game screen. Set the mode to infinite and then run it on your iphone. Does that show up? This will help troubleshoot the problem.

What version itgb are you using?