Anonymous Login
2017-09-20 11:16 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001198OpenClonkEngine - C4Scriptpublic2017-06-20 15:19
ReporterApfelclonk 
Assigned ToZapper 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Version7.0 
Target Version7.2Fixed in Version 
Summary0001198: Radial distribution for CreateParticles()
DescriptionThere is no way to create particles, which spread out radially, with CreateParticles()-parameters or PV_*s only. With the old particle-system you could easily do CastParticles().

Zapper mentioned one way to fix this would be set a fixed seed in PV_Random(). That way you could use the same returned array of PV_Random() for both parameters:

var rnd = PV_Random(0, 360);

CreateParticles([...], PV_Sin(rnd, p_speed), PV_Sin(rnd, p_speed, 90[?]),[...]);
Additional InformationA workaround until there is a consistent way:

for(var i = 0; i < p_amount; i++)
{
 var angle = Random(360);
 CreateParticles([...], Sin(angle, p_speed), -Cos(angle, p_speed), [...]);
}
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0003299

Zapper (developer)

Last edited: 2014-12-30 23:12

View 2 revisions

>Zapper mentioned one way to fix this would be set a fixed seed in PV_Random(). That way you could use the same returned array of PV_Random() for both parameters:

I was talking about some sort of seed-parameter for PV_Random (which then is particle-dependant). Then you could use the same random number for two values in a particle.

CreateParticles(..., PV_Cos(PV_Random(..,SEED1), PV_Random(..,SEED2)), PV_Sin(PV_Random(..,SEED1), PV_Random(..,SEED2)), ...)
.. which would make both Cos and Sin have the same radius and angle because of the same particle-local seed

~0003300

Apfelclonk (reporter)

Ah. then I missunderstood you. But that sounds to be an even nicer solution to implement afterwards, I guess.

~0003673

Maikel (developer)

Is this then resolved?

~0003677

Apfelclonk (reporter)

Last edited: 2015-06-17 14:29

View 2 revisions

As long as nobody fixed this without updating this bug entry, no.
I only missunderstood Zapper in the way he proposed to fix this. The problem is still alive.

~0003678

Maikel (developer)

Ah, I see, PV_Random does not have a seed.

Then we need a seed for that :)

~0005004

occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:
https://git.openclonk.org/openclonk.git/commitdiff/3d71dfbfa9f83358ca4c2f9cc7cf3a3003f43f43

Changeset 3d71dfb by David Dormagen <czapper@gmx.de>
Particles: added a "seed" parameter to PV_Random (0001198)

~0005005

Zapper (developer)

This is implemented via a seed for PV_Random now.

See the docs for an example:
http://docs.openclonk.org/en/sdk/script/fn/PV_Random.html
+Notes

-Issue History
Date Modified Username Field Change
2014-12-30 16:18 Apfelclonk New Issue
2014-12-30 23:11 Zapper Note Added: 0003299
2014-12-30 23:12 Zapper Note Edited: 0003299 View Revisions
2014-12-31 10:22 Apfelclonk Note Added: 0003300
2015-06-16 22:15 Maikel Note Added: 0003673
2015-06-16 22:15 Maikel Status new => feedback
2015-06-17 14:28 Apfelclonk Note Added: 0003677
2015-06-17 14:28 Apfelclonk Status feedback => new
2015-06-17 14:29 Apfelclonk Note Edited: 0003677 View Revisions
2015-06-17 21:55 Maikel Note Added: 0003678
2016-01-27 15:34 Maikel Product Version => 7.0
2016-01-27 15:34 Maikel Target Version => 7.2
2016-01-27 15:34 Maikel Summary Radial destribution for CreateParticles() => Radial distribution for CreateParticles()
2016-01-27 15:34 Maikel Assigned To => Zapper
2016-01-27 15:34 Maikel Status new => assigned
2016-01-29 17:27 Zapper Status assigned => new
2016-01-29 17:29 Zapper Assigned To Zapper =>
2016-02-27 12:40 occ Note Added: 0005004
2016-02-27 12:41 Zapper Note Added: 0005005
2016-02-27 12:41 Zapper Status new => resolved
2016-02-27 12:41 Zapper Resolution open => fixed
2016-02-27 12:41 Zapper Assigned To => Zapper
+Issue History