HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Feedback on my nova system

01-21-2009, 06:54 PM#1
akolyt0r
I recently made a nova spell since i needed one ...then i started optimizing it ...e.g. changing the code so that it uses only 1 timer, and since it wasnt much effort this here turned out ...

What it does:
It casts a wave-spell (like shockwave or breath of fire) circular around the caster, then checks (timer) when the units around the caster will be hit and then applies damage and additional effects (optional).

Any criticsm or any suggestions for improvements ?

Expand JASS:

EDIT: who *** **** changed the thread title xDDD
01-25-2009, 09:18 PM#2
akolyt0r
bump...4days

currently this uses LinkedList, but i think since i worked a lil with "single timer ..blah ...loop trough structarrays" ...i could be able to code this without linked lists ...
That would be better than usage of Linked Lists or ? ..since they are kinda slow ?!

EDIT: What you think of providing the user the option to create and use a custom function for damage/endeffects instead of directly implementing the per target spell/damage in the system ?
01-25-2009, 11:31 PM#3
Zerzax
Use comparison of squares instead of Squareroot. I.E. check if the sum of the squares of dx and dy are greater than the square of the distance you are checking. Also, the code is pretty chunky, I'd recommend indenting those variable declarations by at least one space.

Use TimerUtils or that global list method you mentioned, I think it'd make things simpler.

EDIT: IsUnitInRangeXY would be even better for range confirmation because it factors in collision sizes.
01-25-2009, 11:47 PM#4
akolyt0r
hmm ..yea..i will see ...
But i will definitily not get TimerUtils ..i had them already in the stage of the system before this one ...
Timer Utils dont make sense at all when i got only 1 timer ...

..hmm before i go over it and redo it i would like to know your opinions about my questions in the thread above...(the edit)..since i dont want to redo it too often ...i want to do all in one go ...whatever ..

it would make the system extremly customizeable, however it would be more difficult to use for beginners ...
01-26-2009, 12:11 AM#5
Zerzax
As far as I can tell, systems are progressive and like any other script type. They can constantly be updated and or optimized.

It depends on how flexible you want the system, whether or not people should be able to implement their own OnDamage functions. If you did so, operator overloading would be essential to the process, like in xe. Again it's up to you dude.
01-26-2009, 12:05 PM#6
akolyt0r
@Zerzax ..i dont see where i would need custom operators here ..?!
=============
stage 1 done ...
doesnt use linked list anymore ....custom onTarget function implemented..

todo:
maybe custom filterfunction dunno ...
and group recycling ..

critics ?

Expand JASS:

EDIT: added the possibility to automatically creating a dummy caster for endeffects ...
01-26-2009, 12:12 PM#7
fX_
Quote:
Originally Posted by Zerzax
Use comparison of squares instead of Squareroot. I.E. check if the sum of the squares of dx and dy are greater than the square of the distance you are checking.

That's faster than square root?
01-26-2009, 12:37 PM#8
akolyt0r
sqareroot is pretty slow ..so ..i think yes ...in the last version i use IsUnitInRangeXY ...which works quite well..
01-26-2009, 03:35 PM#9
Anitarf
Meh, I think you should be using units as projectiles instead of dummycasting wave spells.
01-26-2009, 03:53 PM#10
Bobo_The_Kodo
Quote:
Meh, I think you should be using units as projectiles instead of dummycasting wave spells.
Yes you should do that, alot easier to configure, and alot more flexible
01-26-2009, 05:12 PM#11
akolyt0r
hmm...yes it would be more flexible (although its already pretty flexible...), but also it will decrease performance ...

hmm...i would have to change quite a lot, since i wouldnt have to predict anymore where the nova currently is, i could just enum the units in range of the wavedummies *

Well ..i think i will make a version using dummy projectiles instead of waveabilities ...and then i hope i will see which one is better :)

EDIT: But whats your opinion about creating dummies to apply effects on the units ...should i do that ? ...or should i leave it to the user itself ...
I am currently in favor of the second possibility ..since the users of this one already have to have some vJass experience, so they should be able to create a dummy to cast a spell on target unit themselves...

EDIT2: hmm .. i think (*) still would be better ...needs a lot less groupenums ..at cost of some more math ...
01-28-2009, 06:58 PM#12
akolyt0r
Update (requires xebasic now):
Expand JASS:

pretty finished i think ...however i am not quite sure about that stuff with collision size and enums ....
GroupEnums wont find units with a quite big collision size, which are close to the end of the enumrange, or something like that ...
and what will IsUnitInRangeXY return for those units ? true or false ?

Hmm ..i think i will submit this soon ...
I might make another version additionally using xefx aswell (for the sake of modularity).