Showing Effect in JPCT-AE

Started by pritom057, July 07, 2010, 04:34:20 PM

Previous topic - Next topic

pritom057

Hi,
How can I show the effect of bomb blast or something like this??
How to show the firing effect in JPCT-AE

EgonOlsen

Robombs uses textured, transparent quads for this: http://jpct.de/robombs.game/

The sources are available on the site too. It's not an Android game (obviously....), but the code for desktop jPCT is pretty similar.

pritom057

Sir I have downloaded the source code.I want build up a net bean project using this source code to see the code sequence.How can I do this.can you please explain how can I make it??

EgonOlsen

As usual...add the Robombs sources, add the jpct.jar and the lwjgl.jars and dlls/sos/whatever applies to your platform. It's been a long time since i used Netbeans, so i'm not sure where to click exactly but it shouldn't be too hard to figure it out.

BTW: Why Netbeans? Aren't you using Eclipse anyway for the Android plugin?

pritom057

#4
Sir
Thanks for reply.Actually I am very new in java.Actually I am working on Android technology.I am using Eclipse too.I will definitely use Eclipse to run Robombs as java project.

But sir I have another problem. I am not able to start the Robombs...
How to run it can you please explain..
I download it and extract it.Then I run Robombs.cmd.then then press start play.It show a black screen then nothing.What should I do now??

thanks in advance sir

Pritom

EgonOlsen

Might be a compatibility problem. Information on hardware and os as well as a dump of the console output might help.

pritom057

#6
Ok Got IT....It was my graphics card problem.....
Now I am able to Run the program in eclipse...
Thanks EgonOlsen for quick reply

Sir I need one more information...
From where can I download Object3DEditor???

pritom057

Sir I have gone through Robombs code....
But it looks like so complex to me....
Can you please give me some idea or sample code to show the effect in JPCT using texture

Thanks in advance

EgonOlsen

robombs.game.view.Explosion and robombs.game.view.ExplosionManager do the rendering of the explosions. But you'll most likely need only the idea of rendering an animated explosion by using billboards from these sources. You don't need that collision detection stuff that the code does to check if the explosion has hit a wall and all that...

pritom057

Sir,
I think I am not getting you..Can you please tell me the simplest way to show the effect..

It would be very better if you can show me some sample code...


EgonOlsen

The simplest way is to create a textured, transparent, billboarded plane that displays the explosion. If something explodes, make it invisible and show this explosion object instead for a few seconds.


    Object3D plane=Primitives.getPlane(1, 20);
    plane.setBillboarding(true);
    plane.setTexture("yourExplosionTexture");
    plane.setTransparency(20);
    plane.build();


It won't be animated of course. If that's needed, change the texture over time (Object3D.setTexture("..."));