|
From: Daniel Santos <danie...@at...> - 2011-11-16 22:34:53
|
Hey guys, I got behind on my email, so sorry for not attending to this
sooner. I messed with this code a lot in the past, so I knew where to
go with this one. So emissionRate and EmissionRateFade are both floats
now. I added a simple float emissionRateRemainder data member to
ParticleSystem (hmm, I probably should have marked it mutable) and this
just keeps track of the floating portion that isn't used at each frame.
Daniel
On 11/08/2011 04:10 AM, Nathan Turner wrote:
> There's also emission-rate-fade used for splash particles that's int
> in GAE.
>
> From MG 3.5 (it should be the same). Each ParticleSystem::update (in
> particle.cpp) this runs:
>
> if(state != ParticleSystem::sFade){
> emissionState= emissionState + emissionRate;
> int emissionIntValue= (int) emissionState;
> for(int i= 0; i < emissionIntValue; i++){
> Particle *p= createParticle();
> initParticle(p, i);
> }
> emissionState= emissionState - (float) emissionIntValue;
> }
>
>
> In GAE:
>
> if (state != sFade) {
> for (int i = 0; i < emissionRate; ++i) {
> Particle *p = createParticle();
> initParticle(p, i);
> }
> }
>
>
> On 8 November 2011 16:31, Mike Hoffert <omega...@gm...
> <mailto:omega...@gm...>> wrote:
>
> Hmm, I tried to make this example, but GAE threw an error on using
> a float there, and wouldn't let me continue.
>
> Error converting from string to int (base = 10), found: 0.1
>
> I was able to take a screenshot in MegaGlest (this is just a unit
> particle system with a 0.5 emission rate, meaning it releases one
> particle per two cycles (whereas an emission rate of 1 releases
> one particle in one cycle, an emission rate of 5 releases 5
> particles per one cycle, etc). However, with particles being
> animated objects, and in this case, this is all about the timing,
> I don't know how useful this image could be. It pretty much needs
> an example. http://img341.imageshack.us/img341/980/screen4zt.jpg
>
> Dunno if I should make a ticket since I could not reach the criteria?
>
> -Omega
>
> Uploaded with [URL=http://imageshack.us]ImageShack.us[/URL]
>
> On Mon, Nov 7, 2011 at 3:21 PM, James McCulloch <si...@gm...
> <mailto:si...@gm...>> wrote:
>
> Hi Omega,
>
> On account of your technical proficiency, and my current
> lake of free time, could you please package up the following
> for me,
>
> A test unit (off magi or shibbo) with such a system, on the
> stop skill is fine, a building with no valid model is also
> fine here, though it may be easier to just hijack an existing
> unit.
>
> A picture of the system operating in MG.
>
> A picture of the system operating in GAE (if it does at all...)
>
> Create a ticket (if there isn't one already) and attach addon
> compat zip (just shove loose imgs in zip).
>
> Cheers,
> - James
>
>
> On 6 November 2011 13:51, Mike Hoffert <omega...@gm...
> <mailto:omega...@gm...>> wrote:
>
> Hi, it's been pointed out on the board a few times, but
> thought I'd put it somewhere it won't be missed. In
> MegaGlest, particle emission rates are a float value (eg,
> 0.1 means one particle per 10 frames or cycles or
> whatever), whereas in GAE, it's still an int (so no
> decimals ). I don't know the exact extent of the change,
> but recall Titi mentioning it to be "small", and being in
> MegaGlest already, there's a basis if needed. The lack of
> similarity between GAE and MG in this tiny thing means
> some MegaGlest mods using particles with decimal values
> for the emission rate will not function correctly, and
> being a "small" change, I think it should really be pushed
> in somewhere, as it's one of thefew features MegaGlest and
> GAE share where one engine does it differently
> <http://glest.org/glest_board/index.php?topic=7616.0>.
>
> -Omega
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Glestae-devel mailing list
> Glest...@li...
> <mailto:Glest...@li...>
> https://lists.sourceforge.net/lists/listinfo/glestae-devel
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Glestae-devel mailing list
> Glest...@li...
> <mailto:Glest...@li...>
> https://lists.sourceforge.net/lists/listinfo/glestae-devel
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Glestae-devel mailing list
> Glest...@li...
> <mailto:Glest...@li...>
> https://lists.sourceforge.net/lists/listinfo/glestae-devel
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
>
>
> _______________________________________________
> Glestae-devel mailing list
> Glest...@li...
> https://lists.sourceforge.net/lists/listinfo/glestae-devel
|