Author Topic: Showing Effect in JPCT-AE  (Read 5225 times)

Offline pritom057

  • byte
  • *
  • Posts: 27
    • View Profile
Showing Effect in JPCT-AE
« on: July 07, 2010, 04:34:20 pm »
Hi,
How can I show the effect of bomb blast or something like this??
How to show the firing effect in JPCT-AE

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Showing Effect in JPCT-AE
« Reply #1 on: July 07, 2010, 05:23:43 pm »
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.

Offline pritom057

  • byte
  • *
  • Posts: 27
    • View Profile
Re: Showing Effect in JPCT-AE
« Reply #2 on: July 08, 2010, 07:38:30 am »
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??

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Showing Effect in JPCT-AE
« Reply #3 on: July 08, 2010, 08:55:00 am »
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?

Offline pritom057

  • byte
  • *
  • Posts: 27
    • View Profile
Re: Showing Effect in JPCT-AE
« Reply #4 on: July 08, 2010, 10:23:58 am »
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
« Last Edit: July 08, 2010, 10:38:52 am by pritom057 »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Showing Effect in JPCT-AE
« Reply #5 on: July 08, 2010, 12:35:19 pm »
Might be a compatibility problem. Information on hardware and os as well as a dump of the console output might help.

Offline pritom057

  • byte
  • *
  • Posts: 27
    • View Profile
Re: Showing Effect in JPCT-AE
« Reply #6 on: July 08, 2010, 02:50:25 pm »
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???
« Last Edit: July 08, 2010, 02:57:42 pm by pritom057 »

Offline pritom057

  • byte
  • *
  • Posts: 27
    • View Profile
Re: Showing Effect in JPCT-AE
« Reply #7 on: July 13, 2010, 01:34:07 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Showing Effect in JPCT-AE
« Reply #8 on: July 13, 2010, 10:20:43 pm »
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...

Offline pritom057

  • byte
  • *
  • Posts: 27
    • View Profile
Re: Showing Effect in JPCT-AE
« Reply #9 on: July 22, 2010, 08:48:30 am »
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...


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Showing Effect in JPCT-AE
« Reply #10 on: July 22, 2010, 12:16:50 pm »
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.

Code: [Select]
    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("..."));