Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Why is the particle effect different in mono, and how to avoid.

Joris Tolsen
Registered User
Join date: 24 Mar 2008
Posts: 5
11-06-2008 11:08
Because mono should be more efficient i try to compile my scripts in mono. (using viewer 1.21.6), but with one particle oriented program i get a strange result.

I made such a plant spreader program. It makes a grid of rows and columns of rosebushes, using a particle system. (Full perms script available for free at SLX - XLStreet .. http://uncensored.xstreetsl.com/modules.php?name=Marketplace&file=item&ItemID=969117).

Basically the script repeatedly makes a particle system which uses the angle and radius to place a particle on a specific place (and its mirror counterpart .. ). With these particle systems rows and columns are filled with the particles.

The amount of particles/rosebushes which are visible depend on the availability of particles (viewer setting) and the timer setting. At the moment all particles are visible if u use a timer of 5 seconds which results of a drawing of each particle 12 times before it expires.

This is when you leave the checkbox of mono open.

If you compile it with mono, you get columns which are filled and columns that are empty.

This means that odd particle systems often are ineffective to make particles and even particle systems can make particles.

Why is there such a difference ? . Do i introduce it with the way the script works ? Or .. maybe a bug ?
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
11-06-2008 11:16
Particles are a viewer-side effect. The sim just says "do particles!" and the viewer is the one that draws them. I think (could be wrong) that two different people looking at the same particle system may not even see the same thing.

Maybe there's something different in the way mono does the list processing. Any chance you could post some code?
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Joris Tolsen
Registered User
Join date: 24 Mar 2008
Posts: 5
sure . .can post the code ..
11-06-2008 11:36
Code in attachment

picture 001 with mono, picture 002 without mono
same settings same conditions
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
11-06-2008 12:42
It's possible that Mono is executing fast enough that your particles are getting started closer together, and it's getting optimized away.

Play with the delay?
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Joris Tolsen
Registered User
Join date: 24 Mar 2008
Posts: 5
Yess .. that is it !
11-06-2008 13:08
Indeed the delay is the problem ..

if i change the burst rate and the sleep to 1/10 th :
PSYS_SRC_BURST_RATE, (float) 0.01,

llSleep(0.05);

i get a nicely filled pattern .. both with and without mono..
now i can turn down the timer to 15 seconds .. and still have a nice field ..

tx for replying :-)


btw.. i will post the code in the library later .. still working on a fixed random and a circular pattern addition.