wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > vJass Spells
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 09-18-2009, 10:20 PM   #1
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default Hydra 2.1

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: png Hydra.png (329.2 KB, 659 views)
Attached Files
File Type: w3x Hydra2.1.w3x (178.4 KB, 297 views)
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 09-19-2009, 03:00 AM   #2
DanThanh
User
 
DanThanh's Avatar
 
Join Date: Apr 2009
Posts: 137

Submissions (1)

DanThanh has little to show at this moment (7)

Send a message via Yahoo to DanThanh
Default

Thought i don't quite understand the entire code, your stuffs are always epic :)
__________________
DanThanh is offline   Reply With Quote
Old 09-19-2009, 10:11 AM   #3
nichts
User
 
Join Date: Nov 2006
Posts: 40

nichts has little to show at this moment (4)

Default

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)

Last edited by nichts : 09-19-2009 at 10:42 AM.
nichts is offline   Reply With Quote
Old 09-19-2009, 01:16 PM   #4
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

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.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 09-19-2009, 02:21 PM   #5
nichts
User
 
Join Date: Nov 2006
Posts: 40

nichts has little to show at this moment (4)

Default

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

Last edited by nichts : 09-19-2009 at 02:32 PM.
nichts is offline   Reply With Quote
Old 09-19-2009, 02:55 PM   #6
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

that really does no improvement, but maybe I will.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 09-19-2009, 03:12 PM   #7
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

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.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 09-19-2009, 03:16 PM   #8
nichts
User
 
Join Date: Nov 2006
Posts: 40

nichts has little to show at this moment (4)

Default

seems like something is really of here
nichts is offline   Reply With Quote
Old 09-19-2009, 03:47 PM   #9
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Shockwave as a base spell lags because of terrain deformations it causes. Use Carrion Swarm instead.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 09-19-2009, 03:52 PM   #10
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (130)

Default

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 ?

Last edited by Troll-Brain : 09-19-2009 at 03:52 PM.
Troll-Brain is offline   Reply With Quote
Old 09-19-2009, 03:53 PM   #11
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

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.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Old 09-19-2009, 03:57 PM   #12
nichts
User
 
Join Date: Nov 2006
Posts: 40

nichts has little to show at this moment (4)

Default

'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)
nichts is offline   Reply With Quote
Old 09-19-2009, 03:58 PM   #13
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (130)

Default

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.
Troll-Brain is offline   Reply With Quote
Old 09-19-2009, 04:01 PM   #14
nichts
User
 
Join Date: Nov 2006
Posts: 40

nichts has little to show at this moment (4)

Default

you can make carrion swam look exactly like shockwave (minus the terrain deformation o/c)
nichts is offline   Reply With Quote
Old 09-19-2009, 04:21 PM   #15
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

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*
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 04:22 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services