News:

Please help making MegaGlest rock-stable by testing the pre-release snapshots.

Main Menu

[DONE] Particle emission rate should be float

Started by Omega, 22 January 2012, 03:58:14

Omega

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).
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Zoythrus


Kiko

#2
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.

Psychedelic_hands

Quote from: Kiko 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.

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

Quote from: Psychedelic_hands on 22 January 2012, 12:29:11
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

Somewhat off topic, but the max-unit-count has one major advantage: if helps the AI. The AI understands the concept better.

Quote from: Psychedelic_hands on 22 January 2012, 12:29:11
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.

Quote from: Psychedelic_hands on 22 January 2012, 12:29:11
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

Quote from: Omega 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.
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

Quote from: Zoythrus on 22 January 2012, 21:13:17
Quote from: Omega 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.
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

Quote
Quote from: Psychedelic_hands on 22 January 2012, 12:29:11
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 ;)