Problems with ParticleCandy 1.5.2
Blitz3D Forums/Blitz3D Programming/Problems with ParticleCandy 1.5.2
| ||
Anyone else use this? I'm getting occasional "entity does not exist" errors in the FreeParticleSystem() function - seems to be on the line 'FreeEntity PTDummy'. The readme for this version says this problem is fixed so presumably it existed in a previous version as well. Anybody else? Do x-pressive have a forum somewhere I can go to? All I found on their site was 4 german chatrooms, all empty. My game is due to be finished in 11 days time. Bloody middleware. I'm well chuffed. :/ |
| ||
I found another bug a while back - if you free an emitter that still has some particles flying around (even if you stop it, it can have left-over particles), it crashes. I tried solvig that myself by first deleting the particles in the function that frees the emitter, but occasionally I got an error, also with PTDummy I believe. I mailed the author, and he said he would look into it. Maybe you should mail him about this too. |
| ||
Maybe you should mail him about this too. Already did, but like I said.... 11 days to go... :/ |
| ||
Do you need to use freeparticlesystem? maybe you should try stopping all emitters, then use clearparticles(), and then free all emitters? |
| ||
i use it, and havent struck those problems. at the moment im working on modelling, but when i get back to the engine code, im hoping all goes smoothly. |
| ||
GFK I had the same prob (free_emitter crashing if the emitter still had active particles). However, I tracked it down to only those emitters that had a circular rotation parameter. I did email Ben with some sample code demonstrating this, but he couldn't get the same error to occur on his system. |
| ||
You're right, I modified the fountain demo with this in the main loop :if keyhit(14) then freeemitter(em) flushkeys() end ifbut it didn't crash when I pressed backspace, then I modified all particle types to have circular motion, and it did crash. I sent this file to the author, hopefully he'll be able to trace the problem now. |
| ||
[edit] see below. |
| ||
GFK/fall_x What OS are you running? I'm on W2000. |
| ||
XP here. GFK : did you try my suggestion above, or is it not an option? (clearing all particles and then deleting the emitters manually). |
| ||
fall_x But you may not want to clear all emitters. An explosion for example - expanding sphere to give the impression of a shockwave + PCandy emitter. When the sphere is a certain size, the attached emitter is deleted, and then the sphere entity is freed - explosion over. |
| ||
Yes, but in his case, he has the error when doing FreeParticleSystem(), so I assume he does want to clear all emiters. |
| ||
Rolling back your version seems to work... to 1.4.x |
| ||
Hmmm... seems you were right after all about the circular motion thing. I used CandyFactory to import emitter/particle date from an Include. It seems that I *was* using a circularmotion setting of "1" after all. Changed that to 0, problem solved. This still needs fixing though. Thx for the help. |
| ||
This is the fix I made for it :; replace freeemitter by this : Function FreeEmitter (Piv%) Emitter_Stop Piv For Particle.TParticle = Each TParticle If Particle\Piv = Piv Then If GetParent(PTDummyPiv) = Particle\Piv Then EntityParent PTDummyPiv,0,0 End If Delete Particle End If Next Emitter.TEmitter = Object.TEmitter(EntityName(Piv)) FreeEntity Emitter\Piv If Emitter\Snd > 0 FreeSound Emitter\Snd Delete Emitter End Function I'm not sure it works 100% though, but according to the author, it should. It fixes stopping emitters with circular motion - which is also called by freeparticlesystem, so it might solve the problem there as well. |
| ||
The code I posted above only fixed problems with FreeEmitter, but it didn't solve the FreeParticleSystem problems (I just implemented switching levels in my game today, and it crashed sometimes even with that code). The good news is, I just received a private update from Mike for testing, and it seems to be fixed in this. So an update will probably be coming very soon! |
| ||
The good news is, I just received a private update from Mike for testing, and it seems to be fixed in this. So an update will probably be coming very soon! Yup, I got that too. Seems fine now. |