About Store Forum Documentation Contact



Post Reply 
Particles in EE 3.0
Author Message
alkirah Offline
Member

Post: #1
Particles in EE 3.0
Hello, I started to make some tests moving my project to EE 3.0

I have problems with particles ...

Particles particlestmp2;

in init : particlestmp2.load(UID(xx,xx,xx,xx)); // return false so it fails, but adding a Watch shows the 50 particles elements in visual studio. Link to a .particle file

in update : particlestmp2.update();

then in render :
switch(Renderer())
{
case RM_PALETTE:
mat=Matrix(1, pos*3+Vec(Cos(rotation*0.0174532925199f),-Sin(rotation*0.0174532925199f),0)*2.5);
particlestmp2.matrix=mat;
particlestmp2.draw();


No particles are showing at all...

Had some other function that create particles from a gfx image, same result, nothing.

Is particle something that got removed from EE 3.0??

Any tutorial for creating particles from scratch or from ee v1 particle file?

Thanks
05-13-2014 05:10 AM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #2
RE: Particles in EE 3.0
Did you try the 14 - Game Basics\22 - Lights and Particles tutorial?
05-13-2014 06:01 AM
Find all posts by this user Quote this message in a reply
alkirah Offline
Member

Post: #3
RE: Particles in EE 3.0
Yes, the fire object is added directly to world, I need to create particles on demand when events occurs
(This post was last modified: 05-13-2014 11:30 AM by alkirah.)
05-13-2014 11:30 AM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #4
RE: Particles in EE 3.0
In that tutorial, I am able to dynamically create a second fire by using

Game.ObjParamsPtr p = UID(1453082230, 1120382154, 2616960441, 726803702); // The fire object
Game.World.objCreate( *p, MatrixIdentity ); // Create it at (0, 0, 0)

Does this method not work for you?
05-13-2014 07:06 PM
Find all posts by this user Quote this message in a reply
alkirah Offline
Member

Post: #5
RE: Particles in EE 3.0
my game have no world wink all is created dynamicly so no that wouldn't work however, I think I found out why it's not working. I'll investigate tonight after work.

Basicly I had radius_scale_base=0; and that cause problems in EE v3. It must be >0.

For the .particle file, it was created with an old version and some parameters seems off after load(), so guess I'll have to recreate my .particle file.

I'll post back results tonight
(This post was last modified: 05-13-2014 07:19 PM by alkirah.)
05-13-2014 07:19 PM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #6
RE: Particles in EE 3.0
I found it's better (and easier) to use the Game.World system, even when dynamically generating all the content. I just create an empty world and a blank env, then add everything programmatically.
05-13-2014 09:38 PM
Find all posts by this user Quote this message in a reply
alkirah Offline
Member

Post: #7
RE: Particles in EE 3.0
Recreating my .particle file with updated ee v1 fixed the loading/rendering of those particles, new particle file is 208 bytes instead of old at 204.

For the generated particle from code, radius_scale_base=0.1 gave me the equivalent of the old version, plus changing life_total to emitter_life_max instead of life fixed all my problems smile
05-14-2014 03:25 AM
Find all posts by this user Quote this message in a reply
Post Reply