Particle Emitter freeze my Android 2.3.x

Hi

With reference to:
http://hub.jmonkeyengine.org/forum/topic/particle-emitter-freeze-my-android/page/2/

I am using / have used Particle emitters for most of my in-game effects. On all platforms I have it works perfectly.

Then I got hold of a Android 2.3.7 HTC Desire (Adreno 200 GPU). It was very clear to me that particle emitters, caused the game / phone to completely freeze, to such an extent that the phone is completely unresponsive. One has to completely reset the device for it to become functional again. When I do not use particle emitters, the game runs very well and smooth without any issues.

(triangles mesh is what I am using)

I have updated to latest build and I am still getting this issue.

Solutions:

  1. Is there a way for me to detect if the device will be able to run Particle Emitters?

  2. Is this a fixable issue (Will I have to replace all my effects with non-particle emitter nodes?) or a dead end for 2.3.x?

Thank you

@meeshter said: 1. Is there a way for me to detect if the device will be able to run Particle Emitters?
  1. Is this a fixable issue (Will I have to replace all my effects with non-particle emitter nodes?) or a dead end for 2.3.x?

Thank you

  1. The problem is with Adreno 200 GPU, maybe you can detect it on the android side.

  2. That’s not fixable as far as JME is concerned. This is an android version vs hardware issue as explained in this post http://hub.jmonkeyengine.org/forum/topic/freeze-on-adreno-200-gpus-sharedbufferstack/#post-208107 . I doubt Google will fix it anytime soon.
    Your only way is to work around it, getting you back to your 1. question.
    That’s a shame really, but I don’t see what we can do about it.

1 Like

I can test on my device your issue. Just give me APK. I have LG P-698. Which has Adreno 200.
Ofcourse, if you want.

Also, you can try some shaders which fake particles.

http://code.google.com/p/jme-glsl-shaders/
[video]http://www.youtube.com/watch?v=hdQop4yZ-lA&feature=player_embedded[/video]
[video]http://www.youtube.com/watch?v=7XFxbt-dw3I[/video]

1 Like

Is it just Particles that are the main issue? is there nothing we can change about them to make them compatible?

@wezrule said: Is it just Particles that are the main issue? is there nothing we can change about them to make them compatible?
Well... without a testing device that exhibits the issue that'll be kind of difficult.

ahhhhhhhhhhhhhhhhhhhhhhh

ok, @meeshter any chance you can send your phone to @nehon? :wink:

@wezrule said: ahhhhhhhhhhhhhhhhhhhhhhh

ok, @meeshter any chance you can send your phone to @nehon? :wink:

It’s better to send money to @nehon so that he bought the device…

@mifth said: It's better to send money to @nehon so that he bought the device..
LOL , no please don't do that.

@meeshter what you could try though is to set the unshaded material to all your particle emitters. It will look like crap, but at least if it still fails we rule out the particle shader (unshaded seems to work fine on any device)

1 Like
@mifth said: Also, you can try some shaders which fake particles.

Google Code Archive - Long-term storage for Google Code Project Hosting.

I guess these are valid solutions! But I will have to spend some time to convert and rework all the existing effects though. Will definitely look into these for future.

@wezrule said: Is it just Particles that are the main issue? is there nothing we can change about them to make them compatible?

From the testing I have done it is quite conclusive - the app freaked out when supposed to attach / detach / play / stop particle emitters on nodes. All other devices were fine. (I’m not sure which of those actions triggers the problem)

Have tested on: S2, S3, SamsungTab2 10, Prestigio PMP5580C and finally HTC Desire ( :-o )

@wezrule said: ahhhhhhhhhhhhhhhhhhhhhhh

ok, @meeshter any chance you can send your phone to @nehon? :wink:

Will be quite difficult that one… I’m from South Africa!! otherwise I would have :cry:

@nehon said: LOL , no please don't do that.

@meeshter what you could try though is to set the unshaded material to all your particle emitters. It will look like crap, but at least if it still fails we rule out the particle shader (unshaded seems to work fine on any device)

@nehon I will definitely do this… but I have a bit of a problem… Windows7 trashed my linux partition… on which all my JME stuff was, I have a backup but will have to restore it, together with my whole dev env… This was a bad day -feeling loss-

I will get back to you asap.

Thanks for all the feedback, it is much appreciated!!

1 Like
@meeshter said: I'm from South Africa!! otherwise I would have :'(

Awesome, me to, although I fled from there a long time ago :slight_smile: Durban <3

1 Like

@meeshter , @nehon i tried this APK file. It has MovingParticle emitter example. And the emitter worked on my device with Andrero 200 card. But there was only one particle emitter.

@mifth said: @meeshter , @nehon i tried this APK file. It has MovingParticle emitter example. And the emitter worked on my device with Andrero 200 card. But there was only one particle emitter.

@mifth, strangely when I tested with one particle emitter the app did not crash, like I have said before - I am not exactly sure which part of the particle emitter causes the crash yet - so it could be when: more than one is attached / more than one is started / when they are detached.

All the effects did always show up, but for some reason the phone freezes a few seconds into the game. There is a static PE (Particle Effect) which is always on in the background, and then your weapons will attach additional PEs and detach after the lifetime of the effect is expired.

Typically I used 2x2 textures mostly. 128x128 size.

As far as I can remember - the freezing happened on a click / touch event when I do all the attaching of PE and play sounds. These effects were played at least once before freeze too.

These are faint memories - but might be worth looking into.

I will have my dev env ready soon.

Hi there one and all.
I did some playing around on the settings of the particle emitter and getting it not too crash on the andreno and I can now say with success that it has to do with the colors(start/end color). It seems that when I set the start or end color’s alpha channel to 0 it freezes that device.
Can someone confirm this please?

meeshter?

3 Likes

Confirmed, this is the issue, it seems that only alpha (color) values above zero work, I use 0.1f now and the particle effects works perfectly on all my testing devices. e.g. particleEmitter.endColor(x,x,x,0.1f);

I played the game on the device for a few minutes, with no freezing. Particles were attached and detached dynamically with no negative side effects. All particle effects are now running as expected.

Think a fix for this should be included in the SDK to prevent future problems on similar devices!!!

1 Like

nice investigation guys :slight_smile:

@iwgeric just making sure you’ve seen this :slight_smile:

Mm, nice work. Maybe if it still happens then on the next gen particle system I should enforce a minimum alpha of 0.01 or something?

Is there anything special the particle shader does with 0 alpha?