Particle Spawning / Time Scale (Now with .capx)

Get help using Construct 2

Post » Mon Mar 11, 2013 9:07 pm

I'm using a for loop to create a seamless beam trail / laser similar to this with small particles. Works great but the lower the time scale is, the more particles that are spawned. I can't just use every tick or milliseconds because they don't spawn the particles fast enough to make the trail seamless so..any ideas?

Here is a .capx.Tokinsom2013-03-12 05:51:31
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Mon Mar 11, 2013 9:22 pm

You could set it so that at every dt seconds it spawns. I don't work with dt much though so I wouldn't know.
B
7
S
2
Posts: 18
Reputation: 891

Post » Mon Mar 11, 2013 10:02 pm

Using every tick or 0.01 seconds or w/e doesn't spawn particles fast enough to make a seamless trail. I use the loop (which also moves the beam for pixel-perfect collisions) to spawn the particles at a very high rate and that's where the problem lies. For the record they are destroyed shortly after so there's never more than ~20 particles per beam.

I tried giving each beam a variable that is subtracted by n*dt and creates a particle / resets itself each time it goes below 0. It helps but I still get about twice the particles at 0.1 time scale..Tokinsom2013-03-11 22:12:43
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Tue Mar 12, 2013 1:24 am

@Tokinsom
I wonder if there is a way to compare the players distance traveled rather than a time comparison. I'm to green to know for sure. What do you think?
B
20
S
2
Posts: 257
Reputation: 2,431

Post » Tue Mar 12, 2013 1:27 am

Yep , that's an issue with C2 , tried my way around but no luck , C2 isn't fast enough , Did @Ashley limit the number of spawn-able object per tick or what ? Maybe it's for performance or something

this may help ...Whiteclaws2013-03-12 01:28:10
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Tue Mar 12, 2013 3:43 pm

Er..Pretty sure you'd get the same results in CC or anything else. 1 particle per tick simply isn't enough for a seamless trail.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Wed Mar 13, 2013 12:59 am

Bump.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Wed Mar 13, 2013 1:24 am

I'll work on an example for you later ...
Basically , my idea is to make a tail with an array that saves the position of the player each tick ... and for each element it places 1 object that fades away later ...
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt, Lancifer and 31 guests