Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 831 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Animated Particles #465539
05/02/17 19:51
05/02/17 19:51
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
How do I make animated particles? I only know how to make static particles, and change them via my.bitmap (old A6).

Is there a way to make animated particles in A8? Also with roll rotation?

Re: Animated Particles [Re: jumpman] #465541
05/02/17 20:22
05/02/17 20:22
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
Well I use sprite particles for that. There should be more information ins particles.c and the manual


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Animated Particles [Re: alibaba] #465542
05/02/17 20:29
05/02/17 20:29
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
thank you friend!!!!!

Re: Animated Particles [Re: jumpman] #465543
05/02/17 20:30
05/02/17 20:30
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
"Every emulated particle adds a function to the scheduler that runs during its lifespan."

Is this the same as having multiple entities each having a while() loop?

Re: Animated Particles [Re: jumpman] #465547
05/03/17 10:06
05/03/17 10:06
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Originally Posted By: jumpman
"Every emulated particle adds a function to the scheduler that runs during its lifespan."

Is this the same as having multiple entities each having a while() loop?
, hi, might be cause of "Adjust max_entities and nexus if necessary. ". Check if the amount of functions raises in de f11 / diag window.

Re: Animated Particles [Re: Reconnoiter] #465548
05/03/17 11:07
05/03/17 11:07
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
Well kind of... as far as I know they are rendered faster than normal entities.


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Animated Particles [Re: alibaba] #465551
05/03/17 13:35
05/03/17 13:35
Joined: Aug 2003
Posts: 118
Deutschland
E
Ezzett Offline
Member
Ezzett  Offline
Member
E

Joined: Aug 2003
Posts: 118
Deutschland
I don't think that "particle sprites" are rendered much faster than non-particle sprites. Maybe if you use instancing, because you have the pro edition.

Re: Animated Particles [Re: Ezzett] #465553
05/03/17 14:45
05/03/17 14:45
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
afaik, using particles is faster than using sprites but I'm not sure if they support animations. also, regarding your while-question, it's very unlikely that it's implemented that way - it's most likely using a static list (using 'max_particles' as size), iterates through them and calls every particle's event function.


POTATO-MAN saves the day! - Random
Re: Animated Particles [Re: Kartoffel] #465556
05/03/17 15:32
05/03/17 15:32
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
Hi friends!

Using the emulated particles, it does increase the entity count! If I shot out too many particles at once, or made them last too long while I was continually making more, I would get an "Adjust max_entities and nexus" warning

However, I was able to make the particles 3d models, and even animate each of them, like they were regular entities! I was able to rotate their pan and tilt as well. So in this case, Im sure these run way slower than regular particles, however the amount of control you gain is where its advantageous.

Re: Animated Particles [Re: jumpman] #465564
05/03/17 20:18
05/03/17 20:18
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Originally Posted By: jumpman
Using the emulated particles, it does increase the entity count! If I shot out too many particles at once, or made them last too long while I was continually making more, I would get an "Adjust max_entities and nexus" warning
, it obviously increases entity count (otherwise the holy manual would be lying wink ), but as Kartoffel mentions it probably uses static list and not a while for each sprite particle (which saves some speed). You double check it in the f11 / diag window under functions.

Re: Animated Particles [Re: Reconnoiter] #465568
05/03/17 21:53
05/03/17 21:53
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
The emulated particles do increase the count of functions running!

Re: Animated Particles [Re: jumpman] #465575
05/04/17 10:04
05/04/17 10:04
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey, jumpman

Look into 'particles.c' in game studio root folder. You can see that each particle has it's own while loop (p_run_sprite). But I guess you could make your own particles with sprites and handle all of them in one loop.

Greets!

Edit:
Originally Posted By: Reconnoiter
it probably uses static list and not a while for each sprite particle
Nothing build-in works that way tongue
Code:
// internal sprite lifetime and movement function
function p_run_sprite(ENTITY* p)
{
   while (p._LIFESPAN > 0) 
   {
      vec_fill(p.scale_x,0.1*p._SIZE);
      wait(1);

	   if(is(p,_MOVE)) 
	   {
		   VECTOR speed;
		   vec_set(speed,p._VEL_X);
		   vec_scale(speed,time_step);
		   p._VEL_Z -= p._GRAVITY * time_step;
		   vec_add(p.x,speed);  
		}
	   
	   p._LIFESPAN -= time_step;
   }
   ent_remove(p); 
}


Last edited by 3run; 05/04/17 10:05.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Animated Particles [Re: 3run] #465577
05/04/17 12:27
05/04/17 12:27
Joined: Aug 2003
Posts: 118
Deutschland
E
Ezzett Offline
Member
Ezzett  Offline
Member
E

Joined: Aug 2003
Posts: 118
Deutschland
These emulated particles are using ent_createlocal which is identical to ent_create (except when your are creating a game with online functionalities). Each emulated particle is an entity like every other entity.

Re: Animated Particles [Re: Ezzett] #465580
05/04/17 12:57
05/04/17 12:57
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
How about using standard particles and change the p.bmap in the p.event function? You can use skill_a...skill_z as timer conditions or whatever. Might be worth a try.

Last edited by Reconnoiter; 05/04/17 12:57.
Re: Animated Particles [Re: Reconnoiter] #465588
05/04/17 23:01
05/04/17 23:01
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
Thanks! I can do that, though I wouldnt be able to rotate the sprite, which is probably the main reason why I looked into the emulated particles.

Re: Animated Particles [Re: jumpman] #465590
05/05/17 10:27
05/05/17 10:27
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Ah okay. You could somewhat simulate the rotation by using several rotated versions of a bmap for particles but I dont know if that is worth the effort. The fps gain might be minimal anyway in the big picture.

Last edited by Reconnoiter; 05/05/17 10:28.
Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1