• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Will adding damage dealt per wave create lag?

Status
Not open for further replies.
Level 3
Joined
Jun 9, 2010
Messages
31
On a mediocre computer, one that can run halo CE, unreal, and other, smaller games at medium settings, Will this make the computer lag?

I'm creating a tower defense, and was thinking about creating post-wave tallies. For instance, who had the most kills, who dealt the most damage. I already have the kill count set up properly, however if there's multiple towers (anywhere between 8 and 50?) towers all dealing damage at a rate considered "Very High" by WC3, would all those calculations per second add up on the computer's processing ability? Or are all of these calculations minute in the scheme of things?

Also, will this trigger work?

  • WaveDamageCounts3
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set DamageTemp = (Damage taken)
      • Set PlayerWaveDamage[(Player number of (Owner of (Attacking unit)))] = (PlayerWaveDamage[(Player number of (Owner of (Attacking unit)))] + 1)
Thanks,

~Brent
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hehehe.... you can't imagine how many numbers common computers can handle :p don't worry. Just pervent creating tons of creeps at the same time, and prevent toons of heavy special effects.

You can have 1000 towers attacking every 0.1 seg a unit and display floating text for each one of them with the damage dealt, and save the number of hits and total damage dealt by each tower in a hashtable, and it won't lag even if you run WC on a CASIO Watch clock.

Again, what most lags is the Unit creation and special effect (includes Towers missile effect). You can keep them simple with arrows or light bolts, forget about shooting Shockwaves and else.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Warcraft 3 runs thousands and thousands of threads a second, that would be no problem

also note that the unit is attacked function only occurs when the unit actually goes to attack, not when the unit is damaged. You will want to implement a damage engine, like mag described

btw spartipilo, that wont lag but that will glitch because you can only have 99 floating text at once. (or was that text tags...)
 
Level 17
Joined
Jul 17, 2011
Messages
1,864
why dont you just test it first and see what happens' this will not lag if you use arrow projectiles and set the decay time for bones to and flesh to 0 also depending on what other programs you are running it is hard to make a computer lag if there are no graphics to process.
 
Status
Not open for further replies.
Top