HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hydra 2.1

09-18-2009, 10:20 PM#1
Vexorian
Hmnn , so it is 'Hydra' from 'diablo 2'. Anyway, you summon this fire hydra which is like 3 towers and they spit fireballs on units, the units can dodge, yadda yadda yadda.

I am in the process of porting spells to vJass, xe and patch 1.24b, this is the first victim.

Requires:
xe, xecollider, xedamage
TimerUtils
Recommended:
BoundSentinel


Expand code:

Changelog::
* 2.1 :
  - Shockwave is evil, base spell replaced with Carrion Swarn, this improves
    performance A LOT.
  - Removed GroupUtils requirement.
  - It uses the area effect art field instead of the missile art field for
    fire bolts models.
  - Fixed head-not-set-to-null leaks.
Attached Images
File type: pngHydra.png (329.2 KB)
Attached Files
File type: w3xHydra2.1.w3x (178.4 KB)
09-19-2009, 03:00 AM#2
DanThanh
Thought i don't quite understand the entire code, your stuffs are always epic :)
09-19-2009, 10:11 AM#3
nichts
doesn't shootNow and spawnHead leak heads?

btw: Pretty neat spell

Edit: don't know if its that leak, but damn this thing is a fps hog - i played the test map and started out with about 100-120fps after i destroyed the computer (with hydra only - i guess about 25 casts) i got like 15 left and it didn't go up again after all the hydras where gone. (after that i killed him again without a single hydra cast - never went below 80fps)

Edit2: the struct leaks heads too o/c (at-least temporary)
09-19-2009, 01:16 PM#4
Vexorian
I forgot about setting heads to null yes (will fix, I will not, ever set struct things to null in onDestroy, it is lame to do it because it is not a leak). However, handle not set null are not a big deal. Even 25*3 leaks of that kind shouldn't affect your fps that much. So the thing is something else. I will try casting a lot of hydras again and see if it happens to me.

Edit: Yes, tested and there's definitely a big issue in here. Will investigate.

Edit: Fixed the leaks, memory is stable, fps keeps dropping.

Edit: This is lame, I disabled the whole spell trigger, I just cast the base spell many times and it still drops the fps permanently...
edit: also disabled the demo map trigger that runs when a spell is casted.

I think this could be an odd bug with the base spell when you give it the data it is using.
09-19-2009, 02:21 PM#5
nichts
Quote:
Originally Posted by Vexorian
(will fix, I will not, ever set struct things to null in onDestroy, it is lame to do it because it is not a leak)
I agree in general but i clear things on structs that get created in large amounts at the same time while most of the time only a few are active

but back to topic: about the fps think you can rule out one thing: shootNow and everything that gets called by it (except for attemptShot o/c), because the fps drops without shooting a single time

Edit:
Quote:
Originally Posted by Vexorian
Edit: This is lame, I disabled the whole spell trigger, I just cast the base spell many times and it still drops the fps permanently...
edit: also disabled the demo map trigger that runs when a spell is casted.
ok... this is really lame

btw you could do set attemptShoot_code = function attemptShoot once in the init function instead of every shoot attempt
09-19-2009, 02:55 PM#6
Vexorian
that really does no improvement, but maybe I will.
09-19-2009, 03:12 PM#7
Vexorian
It is definitely related the spell casting itself. I made a debug code to call 100 hydras, and after these 100 hydras are gone, fps goes back to 125.0.

What's odd is that I used a retail shockwave as a base spell and it still caused issues.
09-19-2009, 03:16 PM#8
nichts
seems like something is really of here
09-19-2009, 03:47 PM#9
Rising_Dusk
Shockwave as a base spell lags because of terrain deformations it causes. Use Carrion Swarm instead.
09-19-2009, 03:52 PM#10
Troll-Brain
Quote:
Originally Posted by Rising_Dusk
Shockwave as a base spell lags because of terrain deformations it causes. Use Carrion Swarm instead.
Use id instead of english name, we don't all have an english war3 :p

What is the rawcode of "carrion swarm" plz ?
09-19-2009, 03:53 PM#11
Rising_Dusk
Uh, I don't know... Vex does have the English Wc3, though, or at least knows what Carrion Swarm is. Anyways, it is the line spell used by the Dreadlord -- And I pray to God that you know what that is.
09-19-2009, 03:57 PM#12
nichts
'AUcs' is the ability code by default
and since when does shockwave case permanent and giant fps drops (for me like 80fps after about 20 casts)
09-19-2009, 03:58 PM#13
Troll-Brain
Oh this one, ok.
Sometimes i play undead in a melee game, so yes i know it ^^

But it's not a straight line, or maybe you can edit some things to do it.
09-19-2009, 04:01 PM#14
nichts
you can make carrion swam look exactly like shockwave (minus the terrain deformation o/c)
09-19-2009, 04:21 PM#15
Rising_Dusk
Quote:
Originally Posted by nichts
and since when does shockwave case permanent and giant fps drops (for me like 80fps after about 20 casts)
Terrain deformations have always sucked and have always done that to my computer. Whether this happens in base melee with normal Shockwave, I'm unsure, maybe Blizzard just hardcoded that one case to ignore doodads or something. *Shrug*