Author Topic: Suggestion  (Read 4392 times)

Alestance

  • Guest
Suggestion
« on: 5 May 2008, 20:10:00 »
Do you think it'd be possible to make a new property called "Burning" which would make the unit constantly emit fire? Or perhaps give units the ability to emit particles normally? It'd be nothing more than a cool effect.
« Last Edit: 1 January 1970, 00:00:00 by Alestance »

ZaggyDad

  • Guest
(No subject)
« Reply #1 on: 5 May 2008, 21:20:49 »
(But a useful one, like for torches. ;) )

~Zaggy
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
(No subject)
« Reply #2 on: 5 May 2008, 21:45:04 »
The GAE currently allows particles for any skill (previously only attacks had particles).

Adding  <particle value="true" path="particle_proj.xml"/>  to the stop and/or walk skills will cause particles to be emitted.

I'm not sure whether they will be emitted constantly or just once each time the unit moves or stops though  :confused:
« Last Edit: 1 January 1970, 00:00:00 by wciow »
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

@kukac@

  • Guest
topic
« Reply #3 on: 6 May 2008, 06:59:35 »
Quote from: "ZaggyDad"
(But a useful one, like for torches. ;) )

~Zaggy


It is already in Glest:

Code: [Select]
<properties/>
<light enabled="false"/>


Just change to true, and the unit will have light.
« Last Edit: 1 January 1970, 00:00:00 by @kukac@ »

ZaggyDad

  • Guest
(No subject)
« Reply #4 on: 6 May 2008, 17:45:42 »
No. I mean FIRE. Not LIGHT. I already know about that. But a torch needs fire to look good.

~Zaggy
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

@kukac@

  • Guest
topic
« Reply #5 on: 6 May 2008, 18:04:46 »
Ahh, I misunderstood you, sorry.
« Last Edit: 1 January 1970, 00:00:00 by @kukac@ »

daniel.santos

  • Guest
(No subject)
« Reply #6 on: 6 May 2008, 21:42:11 »
Alestance, I think that this is a very important proposal.  Currently, there is a framework in place to do this with effects (having the effect will cause the particle system to run), but it is not fully implemented.  It reads all of the data from the XML and even creates the ParticleSystemType object, it just doesn't go further than that.  I propose
  • A mechanism to have a particle system tied to an actual unit.
  • The particle system will need to be told when to start and how long to run (this is usually done by the start & end of an attack).  It should be able to run constantly (i.e., starts when the unit is created and ends when the unit either dies or is undertaken) or be run every x interval for y duration.  In addition, the interval and duration should support a random range (e.g., 2 to 20 seconds).
  • More than one particle system per unit should be supported.  The collection containing the multiple particle systems should be able to control it's execution, so that they either have their own execution schedule, they alternate or which one gets executed is random.
  • These particle systems should able to have a sound or sound collection associated with them.
  • We need a way to also have sounds tied to the unit directly (loops, random, etc.)
I hope that isn't too much crap.  Here, let me give some examples of possibilities I'm thinking of.
  • A fire elemental may consist almost entirely of a fire particle system, but also have another one that fires off every now and then that's that spews a small flaming particle and makes a crackling sound as if from a wood fire.
  • A zombie may be fine when standing still, but when he moves around, he occasionally drops bits of goo here and there (yuck!!)
  • A high level paladin may have a holy sword that emits glowing particles (that'll take even more engine tweaks).
  • A faerie emits sparkling pretty particles as they flit about.
  • A horseman may leave a trail of dust when running through non grassy terrain.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

Alestance

  • Guest
(No subject)
« Reply #7 on: 7 May 2008, 01:48:50 »
Even though I proposed this idea, there could be problems.

For instance, too many particles can cause game lag, so to augment this suggestion, I propose that an option to limit the number of particles created be set in place, as well.
« Last Edit: 1 January 1970, 00:00:00 by Alestance »

daniel.santos

  • Guest
(No subject)
« Reply #8 on: 11 May 2008, 18:57:37 »
True enough, I suppose a lot of that is in the design.  I still have a lot to learn in the areas of OpenGL and special effects, but particle systems can be designed more intelligently (both in the C++ code as well as the particle.xml configuration) so that it uses a minimum amount of processor & memory for the best effects.  So just doing things smartly will offset a lot of this risk.  But perhaps it would be good to have a max particle limit somewhere, although I personally think I'll ignore this one for now and address performance after we get the basics implemented.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

 

anything