Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 730 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Effects Problem #352130
01/01/11 07:16
01/01/11 07:16
Joined: Jul 2010
Posts: 129
B
bk9iq Offline OP
Member
bk9iq  Offline OP
Member
B

Joined: Jul 2010
Posts: 129
Happy New Year Community laugh
I am trying to make an effect that follow my bullets so I used one of the codes that I found in AUM....
However, the effect start fading out and then no effect start to follow the newly created bullets ...
Here's an example of what I am doing and what's happening just open the effect.c file and press run and wait for 5 seconds and see how the effect starts to disappear and the newly created boxes or bullets have no effect following them...
http://www.multiupload.com/F83YQ1BU2W

Please help

Last edited by bk9iq; 01/01/11 07:17.
Re: Effects Problem [Re: bk9iq] #352132
01/01/11 09:25
01/01/11 09:25
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Very simple:
Standard Nax amount of visible particles is 10000.
Okay, your pullets emit particles constantly.
Now think what happens when you create more emitters: at a given point youre creating more particles in a single moment, than others can fade. So if you press f11 and watch the amount of particles currently running("Count Size" > par) in the debug pannel.
You'll notice, that you reach 10000 particles. If your code tries to create more, new particles are not generated.

So, lower the amount of particles generated by a single emitter in a single frame and adjust the effect to work/look good with less particles wink

EDIT: or you could just raise the max amount of usable particles, but i think its better to improve the particle code itself wink

edit2: for example I set the amount of particles to create from 5 to 2 and adjusted the velocity like this:

Code:
p->vel_x = 2 - random(4);
   p->vel_y = 2 - random(4);
   p->vel_z = 0;



and changed the fading to:

Code:
p.alpha -= 8 * time_step; // fade out the fire particles
if (p.alpha <= 0)
{
  p.lifespan = 0;
}



So they are fading faster, and have the trail adjusted for faster fading wink

Your code worked with just 33 entities. MY code works with more than 100 laugh

Greets
Rackscha

Last edited by Rackscha; 01/01/11 09:34.

MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Effects Problem [Re: Rackscha] #352152
01/01/11 16:31
01/01/11 16:31
Joined: Jul 2010
Posts: 129
B
bk9iq Offline OP
Member
bk9iq  Offline OP
Member
B

Joined: Jul 2010
Posts: 129
Rackscha thank u so much for the detailed explanation laugh

Edit: Solved the problem by adding walls all around but I am still trying to get a better result...
so is it possible to remove the particles once they are out of the screen or view in order to decrease the count?


Thanks Again laugh


Last edited by bk9iq; 01/01/11 18:10.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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