Emitter System Test Project

I’ve been meaning to put this out here for a while (along with a list of other things I need to do) and so here it is…

The project contains:

A ton of different emitter configurations
Spell effects
Physics-based explosions
Individual Influencer tests with multiple configuration
A ton of different sprite images that you’ll likely find useful

Anyways… It shows how to set up your emitters via code, etc.

Just download the following files from HERE:

EmitterTests.rar
tonegod.gui.jar
tonegod.emitter.jar

Open the project in the rar file,
Go to Properties > Libraries >
Point the existing references for the gui library and emitter to the jar files you downloaded.
And run the individual files in the project to check them out.

The sources are pretty straight forward and should be easily understood. If you have any questions, feel free to ask me.

Have fun!

5 Likes

Just to doublecheck - https://code.google.com/p/tonegodemitter/ is GPL3 on purpose? Asking, because last 3 times somebody used GPL for a library, it turned out that it was by accident, so there is always a hope :wink:

In any case, great effects - spell 4 is probably my favorite.

@abies said: Just to doublecheck - https://code.google.com/p/tonegodemitter/ is GPL3 on purpose? Asking, because last 3 times somebody used GPL for a library, it turned out that it was by accident, so there is always a hope ;)

In any case, great effects - spell 4 is probably my favorite.

This wasn’t intentional… sorry. If I can figure out where/how I set this, I’ll change it. It’s supposed to be the same as JME.

Updated to New BSD. I’m thinking the other was the default and I forgot to select the correct license.

Hey, is there a plugin solution to the IDE? I ask mostly because it would be useful if there was a way to visualize emitters as they are changed through a preview window rather then have to recompile a project to see the result of an emitter.

@squizzle said: Hey, is there a plugin solution to the IDE? I ask mostly because it would be useful if there was a way to visualize emitters as they are changed through a preview window rather then have to recompile a project to see the result of an emitter.

Working on that now actually. I’ll post when it is updated. This project was a temporary solution… plus it helps to know what’s going on code-wise.

EDIT: Ooops… I misread this. No to the IDE plugin… however the FX Builder lets you do this.

Dude, I would like to complement you and thank you for this amazing contribution.
This just made my year.
Thanks a lot.

1 Like
@ndebruyn said: Dude, I would like to complement you and thank you for this amazing contribution.
Tonegod is a dudette, not dude ;)

Small diff against emitter source for people using latest jme3

(converted few interpolate to interpolateLocal on Vector3f)

Plus, very small change to Emitter, to get rid of generics warning:

Index: Emitter.java
===================================================================
--- Emitter.java	(revision 42)
+++ Emitter.java	(working copy)
@@ -94,7 +94,7 @@
 	private Spatial spatial;
 	private String name;
 	EmitterMesh emitterShape = new EmitterMesh();
-	Class particleType = ParticleDataTriMesh.class;
+	Class<? extends ParticleDataMesh> particleType = ParticleDataTriMesh.class;
 	ParticleDataMesh mesh = null;
 	Mesh template = null;
 	ParticleData[] particles;
@@ -1441,7 +1441,7 @@
 		
 		// Reconstruct particle mesh
 		try {
-			particleType = Class.forName(ic.readString("particleType", ParticleDataTriMesh.class.getName()));
+			particleType = Class.forName(ic.readString("particleType", ParticleDataTriMesh.class.getName())).asSubclass(ParticleDataMesh.class);
 		} catch (IOException | ClassNotFoundException ex) {
 			particleType = ParticleDataTriMesh.class;
 		}
1 Like

:facepalm:

@abies said: Tonegod is a dudette, not dude ;)

Small diff against emitter source for people using latest jme3

(converted few interpolate to interpolateLocal on Vector3f)

Plus, very small change to Emitter, to get rid of generics warning:

[code]
Index: Emitter.java

— Emitter.java (revision 42)
+++ Emitter.java (working copy)
@@ -94,7 +94,7 @@
private Spatial spatial;
private String name;
EmitterMesh emitterShape = new EmitterMesh();

  • Class particleType = ParticleDataTriMesh.class;
  • Class<? extends ParticleDataMesh> particleType = ParticleDataTriMesh.class;
    ParticleDataMesh mesh = null;
    Mesh template = null;
    ParticleData[] particles;
    @@ -1441,7 +1441,7 @@

    // Reconstruct particle mesh
    try {
    
  •   	particleType = Class.forName(ic.readString("particleType", ParticleDataTriMesh.class.getName()));
    
  •   	particleType = Class.forName(ic.readString("particleType", ParticleDataTriMesh.class.getName())).asSubclass(ParticleDataMesh.class);
      } catch (IOException | ClassNotFoundException ex) {
      	particleType = ParticleDataTriMesh.class;
      }
    

[/code]

Thanks for this. The interpolate/interpolateLocal change will get updated once it is part of an official release. The other I’ll update right away!

@ndebruyn said: :facepalm:

Seriously… don’t worry about it. It’s not like it makes a difference… I could be an kangaroo and the outcome is still the same :wink:

And thank you for the thanks! Very nice of you!