Author Topic: Throttling effects?  (Read 335 times)

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Throttling effects?
« on: August 27, 2011, 07:07:01 pm »


                <wraps his hands around the neck...>

I'm reading up on Fox's spells (also looking at _guiles, of course :-) and something occured to me...

Has anyone done any experimentation with throttling effects when there is a whole lot going on? Something along the lines of putting in a "If !bThrottled EffectVisualEffect()..." (or possibly substituting a shorter/faster/abbreviated effect for one of the big hogs) in the spell scripts?

It would require a check whenever an effect was started, adding a weight (Different effects being weighted by both duration and GPU load...) to the TotalEffectsWeight in play (and subtracting it at the end of the effect duration), deciding whether bThrottled was true based on the total weight of effects...

But, at least in my mind, if there were a lot of spellcasting going on and (when the CamelsStraw spell was cast) if spells afterward received only abbreviated effects until the graphics load eased... might make insane mage duels more playable.

After all, once every caster in view has premonition, protection from 3 different things, ethereal V, and an ioun stone (fer cryin in yer vino!), extra flash doesn't really add *that* much to the actual combat... IMOHO...

Am I barking up the wrong tree? Am I mad? Am I barking mad? 

Or just whining ineffectually... :-P

<...of a bottle of Bayberry Red Private Reserve (infinitely better than Mad Dog 2020!)>
               
               

               


                     Modifié par Rolo Kipp, 27 août 2011 - 06:11 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Throttling effects?
« Reply #1 on: August 28, 2011, 12:59:55 am »


               Just calculating that would take a not inconsiderable amount of cpu. We offer players !lowmode through an engine hack, which turns off a lot of flashy, lag-inducing vfx for that client. Vfx lag is almost entirely client-side, remember. If you're unclear on the distinction, I talk about them at length in the 1.69 lexicon article about delagging your server.

Funky
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Throttling effects?
« Reply #2 on: August 28, 2011, 01:21:48 am »


               <Thinking globally...>

I read it front to back as soon as I found it :-)

I have very little experience with hosted modules, being off-grid most of the time. So I was (unconsciously) thinking specifically of reducing the lag on my own poor laptop by throttling back the effects. But *only* when they are ganging up on me.

How would I "sense" the effect overload?
How do I freeze the effects stock market?
How do I recover from turning them down/off?
Is it all pointless? Wait. Different rant. Sorry :-)

Yes, it would impact the CPU, but if the functions are called specifically by spell (and other effect producing (non-hardcoded)) scripts only at the inception of the effect (and the end, via delay) would the GPU benefit of throttling (in a SP module) out weigh the CPU usage? Has anyone done anything like this?

In areas with a lot of effects (I accidentally started a huge fight between my Forest Wyrd vs. Forest Wyrm and about 20 level 20 rangers (summoned pack) in the Wildwoods tileset...ouch!), my GPU definitely limits the game.

(OK, I admit it... I set up the fight on purpose... :-)

And thank you for responding :-) I'm always interested in your posts.

<...but coding locally>
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Throttling effects?
« Reply #3 on: August 28, 2011, 01:27:32 am »


               I'm afraid to even look at the coding for that Funky.  '<img'>

@ Kip, yeah, I feel ya mate, NWN is a really old game, and it just doesn't support good hardware.

The game even runs horrible on my i5 with a GTS 450 Video card, really bad too.
I can still build like a champ though on this thing!  Put NWN on an SSD & Ramped up my processor to 3.2 GHz '<img'>
               
               

               


                     Modifié par _Guile, 28 août 2011 - 12:30 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Throttling effects?
« Reply #4 on: August 28, 2011, 01:38:53 am »


               <Looks really...>

my i5 with a GTS 450 Video card, really bad too.
... Put NWN on an SSD & Ramped up my processor to 3.2 GHz '<img'>

:-P :-)

I can still build like a champ though on this thing!

Yup. You can :-)

<...jealous of _Guile>
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Throttling effects?
« Reply #5 on: August 28, 2011, 01:48:01 am »


               

_Guile wrote...

I'm afraid to even look at the coding for that Funky.  '<img'>


So am I - it's acaos'. '<img'>

I'd put it on offer if I had the faintest clue how, though it'd only work for nwnx with linux, I'm fairly certain.

Funky
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Throttling effects?
« Reply #6 on: August 28, 2011, 01:50:05 am »


               

Rolo Kipp wrote...

<Thinking globally...>

I read it front to back as soon as I found it :-)

I have very little experience with hosted modules, being off-grid most of the time. So I was (unconsciously) thinking specifically of reducing the lag on my own poor laptop by throttling back the effects. But *only* when they are ganging up on me.

How would I "sense" the effect overload?
How do I freeze the effects stock market?
How do I recover from turning them down/off?
Is it all pointless? Wait. Different rant. Sorry :-)


Unfortunately, the answer to all of those except sensing the overload effects is - I have no idea.

For sensing overload, it'll look like lag, but anyone else seeing the same thing with a more powerful graphics card should experience less of it. I cover that in the tutorial, somewhere.

Funky
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Throttling effects?
« Reply #7 on: August 28, 2011, 01:58:54 am »


               <holding out a mug...>

FunkySwerve wrote...

Unfortunately, the answer to all of those except sensing the overload effects is - I have no idea.

For sensing overload, it'll look like lag, but anyone else seeing the same thing with a more powerful graphics card should experience less of it. I cover that in the tutorial, somewhere.

Yup. That's why I'm thinking of a weighted threshold on a trap door.  God-class Gfx cards could set their threshold high, and us peons (ewwww!) could beg for mercy earlier...

I mean, if DetermineCombatRound can offer a special combat ai without too much impact, the same sort of trapdoor calling for lower impact effects might be useful.

It's just a thought at this point.

And I am interested if anyone has tried something similar to dynamically adjust the effects they call based on load.

<...and scowling at what was poured in>