0

I am trying different libgdx features to develop a 3D game for android, as it works very fine upto loading 3D models and perform animations on them. Now the big problem i found that its difficult to produce complex 3D effects like shooting, fire etc. Without them it won't look real. I know about particle editor but I am working on ubuntu 14 system where its not working properly.

I have used 'particle system' from this page for basic effects libgdx 3d particle effect

So any ideas? If you have got some sample code/library/tool then please put it here. Thanks.

  • With particle editor do you mean "Flame", which is mentioned in the link you posted? Are you sure, that it does not work on ubuntu 14? Besides `ParticeEffect`s, `Shader`s can be used to create some "eye-candy", if you want to create a 3D game with libgdx you should definitely use some GLSL Shaders. – Robert P Nov 12 '14 at 15:39

1 Answers1

0

I recently post a class particle management, maybe this can help you

To use this :

myParticles = new MyParticles(camera3d);

//load assets
assets.setLoader(ParticleEffect.class, myParticles.loader);
assets.load("particles/explosion1.part", ParticleEffect.class, myParticles.loadParam);
assets.load("particles/explosion2.part", ParticleEffect.class, myParticles.loadParam);
assets.finishLoading();

//load Pooler
HashMap<String, String> particle = new HashMap<String, String>();
particle.put("explosion_small", "particles/explosion1.part");
particle.put("explosion_big", "particles/explosion2.part");
myParticles.loadPool(particle, assets);
particle.clear();

//create particle ( array is better )
exploseSmall = myParticles.createEffect(myParticles.pool.get("explosion_small"));
exploseBig = myParticles.createEffect(myParticles.pool.get("explosion_big"));

//render methode
modelBatch.begin(camera);
myParticles.render();
modelBatch.render(myParticles.particleSystem);
modelBatch.end();

//dispose effect with timer
myParticle.free(exploseSmall, 0.5f);
myParticle.free(exploseBig, 1);

//dispose myparticle system and pooler
myParticle.dispose();
Adandev
  • 98
  • 1
  • 8