Author Topic: [DONE] Particle emission rate should be float  (Read 3379 times)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
[DONE] Particle emission rate should be float
« on: 22 January 2012, 03:58:14 »
Blast, I could have sworn I brought this up before, but I'm either mistaken or lost the thread. As we know, GAE's particle emissions are an integer, meaning it must be a whole number. Particle emission is the number of particles let off each cycle. So a value of 20 would release 20 particles each cycle (a lot), while 1 would only release a single particle. However, that's as low as we can go. MegaGlest has, for quite some time, had the particle emission as a float (meaning decimals could be used). So a value of 0.1 would release 1 particle every 10 cycles.

The reason I think this is so urgent is the fact that we've had a few attempts to use MegaGlest mods on GAE that were halted because of only one inconsistency, this one. It's a reasonably small change that would allow many MegaGlest mods to function on GAE (well, Japanese, at least). At the very least, as a temporary measure, values below 1 could simply be rounded up to 1 (though we should support proper float values for particle emission).
« Last Edit: 23 January 2012, 14:12:28 by Omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Zoythrus

  • Guest
Re: Particle emission rate should be float
« Reply #1 on: 22 January 2012, 06:03:36 »
Agreed, this has my support.

-Zoy

Kiko

  • Guest
Making MG mods work on GAE
« Reply #2 on: 22 January 2012, 10:05:28 »
Having just got the Japanese faction working with GAE thanks to Omega pointing out that multiple animations and floats in the particle definitions were the problems, I'd like to suggest the following;
  • If a float particle emission value is found by GAE it could just set it to 1 (or perhaps on float or any other error..?)
  • Could GAE just take the first animation definition and ignore following ones rather than CTD?
  • Can max-unit-count be added to GAE-4?
The Japanese faction under GAE has no max-unit-count, so the limit of 4 Shinobi units is lost, and this will also affect Ming when I do that soon.
« Last Edit: 22 January 2012, 10:11:40 by Kiko »

Psychedelic_hands

  • Guest
Re: Making MG mods work on GAE
« Reply #3 on: 22 January 2012, 12:29:11 »
Having just got the Japanese faction working with GAE thanks to Omega pointing out that multiple animations and floats in the particle definitions were the problems, I'd like to suggest the following;
  • If a float particle emission value is found by GAE it could just set it to 1 (or perhaps on float or any other error..?)
  • Could GAE just take the first animation definition and ignore following ones rather than CTD?
  • Can max-unit-count be added to GAE-4?
The Japanese faction under GAE has no max-unit-count, so the limit of 4 Shinobi units is lost, and this will also affect Ming when I do that soon.

1: C++ wouldn't really work like that I don't think, but anyway, I'm fairly certain that has already been changed in GIT.
2: Long over due feature in GAE, maybe copy it from MG ( along with the new particle features ;))
3: This is VERY possible in GAE, just done in a different way though hidden resources.... I could have sworn Titi said he was going to start using this way too somewhere....

(Next time Kiko, start a new thread... Or search for more relevant threads ( I could have sworn some else started a thread about this topic before....)

Zoythrus

  • Guest
Re: Making MG mods work on GAE
« Reply #4 on: 22 January 2012, 16:32:44 »
3: This is VERY possible in GAE, just done in a different way though hidden resources.... I could have sworn Titi said he was going to start using this way too somewhere....

personally, i highly dislike this approach to it. I've used both ways of doing it, and i prefer not to use a hidden resource. It just feels clunky....

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Particle emission rate should be float
« Reply #5 on: 22 January 2012, 18:11:04 »
Somewhat off topic, but the max-unit-count has one major advantage: if helps the AI. The AI understands the concept better.

1: C++ wouldn't really work like that I don't think, but anyway, I'm fairly certain that has already been changed in GIT.
Has it? I'll have to check, as I failed to find any tickets, etc.

2: Long over due feature in GAE, maybe copy it from MG ( along with the new particle features ;))
Yeah, animated projectiles, particles on tilesets, and all the new particle features MegaGlest has. It's a lot to do, though.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Zoythrus

  • Guest
Re: Particle emission rate should be float
« Reply #6 on: 22 January 2012, 21:13:17 »
Somewhat off topic, but the max-unit-count has one major advantage: if helps the AI. The AI understands the concept better.
the whole "hidden resource" just adds more stuff that increases the mod's size. why add a new resource when you can just state one line in the unit's XML?

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Particle emission rate should be float
« Reply #7 on: 22 January 2012, 21:50:39 »
Somewhat off topic, but the max-unit-count has one major advantage: if helps the AI. The AI understands the concept better.
the whole "hidden resource" just adds more stuff that increases the mod's size. why add a new resource when you can just state one line in the unit's XML?
True, but in certain cases, hidden resources are more versatile. You could have a choice between three hero units, but only able to have one at a time, for example. Of course, I'd like to see max-unit-count implemented too, not for the extra 5 lines of text, but for the AI improvements and MegaGlest compatability.  But this is the particle emission thread, make a new one. ;)
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Psychedelic_hands

  • Guest
Re: Particle emission rate should be float
« Reply #8 on: 23 January 2012, 04:36:15 »
Quote
1: C++ wouldn't really work like that I don't think, but anyway, I'm fairly certain that has already been changed in GIT.
Has it? I'll have to check, as I failed to find any tickets, etc.

http://sourceforge.net/mailarchive/message.php?msg_id=28410134

Daniel.Santos seems to have done it ;)