6 registered members (AndrewAMD, Ayumi, degenerate_762, 7th_zorro, VoroneTZ, HoopyDerFrood),
1,268
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Animated Particles
[Re: jumpman]
#465575
05/04/17 10:04
05/04/17 10:04
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
Senior Expert
|
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: it probably uses static list and not a while for each sprite particle Nothing build-in works that way
// 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.
|
|
|
Re: Animated Particles
[Re: Ezzett]
#465580
05/04/17 12:57
05/04/17 12:57
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
Serious User
|
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: jumpman]
#465590
05/05/17 10:27
05/05/17 10:27
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
Serious User
|
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.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|