• 🏆 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!

[FINISHED] Spells&Systems Mini-Contest #10

Status
Not open for further replies.
Level 11
Joined
Aug 25, 2006
Messages
971
US/California

It finishes in 1 hour and 40 minutes, as far as I know.
You mean you expect me to wait that long for the contest to close. *Throws a tantrum* *Breaks a window* *smashes computer*

Oh heres what threw me off.
30th December (Monday)
The 30th of December (today) is a Sunday!!!


@Herman I've never seen so many leaks in one spell. Take a look at what war3err printed out after one cast of your spell. (Attached screenshot)
 

Attachments

  • WC3ScrnShot_123007_143026_01.jpg
    WC3ScrnShot_123007_143026_01.jpg
    92.9 KB · Views: 156
Level 7
Joined
Oct 5, 2007
Messages
118
Man, it's GUI, so what do you expect? ^^ But serios, I was also a little scared when I looked at some of these spells with war3err...
 
Level 11
Joined
Aug 25, 2006
Messages
971
Hehe, I only use 2 groups (and no locations) in my spell! However for collisions I repeatedly build/destroy a unitgroup. Perhaps it would be more optimized if I made it global and just used it over and over again??
 
Level 12
Joined
Aug 20, 2007
Messages
866
I know why all the errors

In GUI, globals clear after they are reset


In other words, if you set point1 = (some point)

Then use the point

Then reset point1 = (another point)

You do not need to do RemoveLocation(udg_point1)
set point1 = null

Inbetween them, just at the end

It technically leaked, but since you told WC you are not using it, it assumes you want it deleted, and clears the leak


I'm going out on a limb here, and assuming that checker is for JASS
I'n JASS the variables are cleared slightly differently
They are all in one big trigger

While, in GUI, they are seperated, so if I clear a leak here, won't show up in the other triggers

By the way, I have not done anything with the leaks yet (really wanted to get the MUI down first, the only 2 cast bug)



Technically, it leaks crazy like that, but it doesn't show up as cleared, because that program probably checks for the JASS remove/destroy functions

When I finish the spell I will clear all those leaks, don't worry about it 'till then, for now, I wanna know why the heck it doesn't work after cast two

I haven't looked over the spell map yet (trying to install WoW, and isn't going so well) but I'm almost 100% certain it's got somethin to do with how I stored the variables
 
Level 11
Joined
Aug 25, 2006
Messages
971
You are sort of correct sort of wrong.
Points work exactly like units.
If you create a unit, then set X = (that unit)
If you say X = (Some other unit)
does the first unit go away? no!

Points are like that, anything that returns a point first must create the point. If you don't destroy the point, even if you never use that point again, it'll still be there.

Both JASS and GUI work the same, JASS is just a smarter way of doing things.

Like both a saw and a hammer can be used to split wood, its just one gives you more control. Physics doesn't magically change from one to the other, the physics are just applied differently.

It technically leaked, but since you told WC you are not using it, it assumes you want it deleted, and clears the leak
Damn I wish wc3 was that smart. No it doesn't do that...


Oh and I pointed out a bug, check my previous posts.
 
Level 12
Joined
Aug 20, 2007
Messages
866
For collisions

I use GUI, but when I do it, it's pretty much exactly the same thing as what you said, just constantly reseting a "Units In Range" group

________________________

I ment for globals

Sorry, double-post

The global variables clear the object handles that way, except maybe units, I think they are slightly different

I'm pretty sure I'm right on this one, or else that spell would crash WC everytime it's cast

I don't use leak checkers, I use the /fps in-game function to check for most of the bad leaks, if you cast the spell, you will notice the fps drops from around 65.0 to about 40.0, but right back up to 65.0 (slightly less due to arrays)

If the variables didn't clear the leaks, the number would stay at 40.0
[the numbers are always jumping, these are approximations]
 
Level 11
Joined
Aug 25, 2006
Messages
971
(You might want to reread my above post, I edited like a dozen times)
Trust me, if war3err says something wasn't destroyed, it wasn't destroyed.
Jass isn't jass in-game. During the loading process its transformed into bytecode. War3err has a hook into warcraft's realtime bytecode reading process. It watches what happens. Its not like a leak-checker. Its realtime, meaning it tells you what leaks did happen, and what leaks are happening.

A location leak is probably around 12 bytes. Not really noticable. The fps change is caused by processor speed being taken up, not by leaks.

Gui doesn't work differently then JASS. GUI IS jass. When you press the save button, it converts all your GUI into jass! They work exactly the same... You don't have to null globals, but you do have to destroy objects before you create new ones.

If I'm correct (about a location being 12 bytes) it would take 83,000 location leaks to cause a single megabyte increase in memory.
 
Level 12
Joined
Aug 20, 2007
Messages
866
Hmmmm

Are you sure?

Lol thats about all I can say to that, if your right, I pretty much gotta re-learn everything I know about leaks

When I was talking about the points, I was talking about when you set it to a global

if you leave it as is, it leaks

if you set it to a variable, then reset the variable, the leak is cleared (but now you have another point to clear ><)


____________________
EDIT POST #1

Was the bug the leaks???

_____________________________

EDIT POST #2

Uhhhhhh, so after I figure out how the heck I can get the spell to work more than once, maybe you could help me out with the leaks as well???

(A few things I know for sure I need to get rid of, including the dummy unit that stores the custom value for the caster)
 
Level 11
Joined
Aug 25, 2006
Messages
971
BTW you need to destroy AND null locals
You just need to destroy globals

First go here
http://www.cplusplus.com/doc/tutorial/pointers.html
Just read until you understand what a pointer is.

Incase the above is a bit too complicated to understand.
A pointer is a value that tells you where you can find something.
Like if you wanted an integer, you could pass around a pointer to the integer. Then if you wanted to modify that integer you use the pointer to find it. Then you modify it.

When your passing around a location your passing around a pointer to the object which is the location. When you null/change that variable, you just wiped the pointer out of existence. The location object stays there. When you destroy the location, it destroys the object but leaves the pointer. For globals its ok if the pointer stays, it will just get overwritten next time. For locals, it won't destroy the variable unless the pointer is null.

(For further note, a variable will return null in JASS if the pointer or/and the object is null, it doesn't mean their both null if it returns so.)

Anyway, I hope that helps you..

Also for further reference, a 'handle' in wc3 is a form of a pointer.

On a peronal note, I think you should put some effort into learning JASS then vJASS, I think it would really set you free.


More info about how wc3 deals with triggers:
Wc3 is constantly running a thread. Think of a long line of thread. Thats how it deals with triggers, it does everything it can on one, then during a wait/timer it'll work on a different trigger until it reaches the end OR until a wait/timer. So in actuality everything is sort of like one giant trigger. Will, what happens if there aren't any triggers running, one might wonder. If thats the case then the thread will be constantly checking the events, when they work, it runs the trigger! Even if there are no triggers, warcraft has its own jass files which I'm assuming it runs. Wc3 automatically stores what functions are being run as a result of what trigger, this data can be accessed as a result of GetTriggeringTrigger().
 
Last edited:
Level 12
Joined
Aug 20, 2007
Messages
866
I always wondered that

Yeah, I always wondered how exactly it knew when a unit was killed, it would need to have some kind of timer (like what you said) running at the core of its programming checking if a unit had been killed

Heh, yeah I thought I knew a thing or two about regular JASS, but I'm still learning at a beginner level

The one thing I really don't understand about JASS, for movement (periodic timers), you can't just set a loop w/ a wait, so how do you do the periodic timers???

Create a whole new (JASS) trigger with the .01 event???
 
Level 11
Joined
Aug 25, 2006
Messages
971
Behold
JASS:
native TimerStart           takes timer whichTimer, real timeout, boolean periodic, code handlerFunc returns nothing

We don't make a whole new trigger (generally) Most of the time we just make a new function. We can still use waits, its just a wait can't go down all the way to .01, while a timer can go to .001

If you look at my spell, I used a whole new trigger for movement. However I only used two triggers. One for creation, one for everything else.
 
Level 7
Joined
Oct 5, 2007
Messages
118
Or you could also look at my spell, Herman, it's a brilliant example of using timers (or at least I think so o_O)... The whole movement and melting thing is done with timers.
And I use only one trigger (=what you see in the Trigger Editor) but in real there are 2 triggers: One that detects the cast and one that detects the end of cast...
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
@ wd40bomber7:
Instead of periodically created a group and destroying for each iteration, you should just use the same group over and over, and clear the group variable after each loop (like what I did :p). Using a global would technically be faster, but that really doesn't change much (except for things like physics systems and elaborate engines).

@Herman:
As far as I know, setting a location variable to another location, like:
JASS:
local location l=Location(0.,0.)
set l=Location(1.,1.)
call RemoveLocation(l)
set l=null
WILL STILL LEAK! Because you're creating a new location, NOT replacing it.
If you don't want it to leak, you'd have to use the MoveLocation native:
JASS:
native MoveLocation             takes location whichLocation, real newX, real newY returns nothing

So instead, you'd do:
JASS:
local location l=Location(0.,0.)
call MoveLocation(l,1.,1.)
call RemoveLocation(l)
set l=null
That shouldn't leak :wthumbsup:
 
Level 7
Joined
Oct 5, 2007
Messages
118
Sry HINDYhat, but Location _allways_ leak, there's no way to fix it... only (very complicated) method is the recycling of global locations.
But, there's another method that avoids sucking location-leaks: Work with coordinates, cause they are only reals and reals don't leak.

btw: PURPLEPOOT!!!
 
Level 12
Joined
Aug 20, 2007
Messages
866
Yeah

But does the GUI

  • Set point1 = Position of Caster
  • Unit - Create 1 Footman at point1 facing 270 degrees
  • Set point1 = Position of Last Created Unit
  • Special Effect - Create Special Effect "Some Effect.mdl" at point1
  • Custom Script: call RemoveLocation(udg_point1)
  • Custom Script: set udg_point1 = null
This will clear the leak correct???
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
XieLong, locations only leak if you don't remove/null them. Of course, most handles must be removed when you don't need them, and most local handle must be nulled at the end of a function. Whenever you use a native for creating a location, overwriting a location WON'T remove the first location's leak. It will overlap the value, and the first value will be lost in memory, and thus a handle leak (which costs alot more than a null leak). Using the MoveLocation native, however, will replace the position of the concerned location, resulting in no leak.

Don't think I wouldn't know. I've been using this method for a long time now, and I'd notice a leak if there was one.

I always work with coordinates, although there are some times where you NEED to work with locations (like getting the X/Y coordinates of the targeted point from a spell, or getting the Z height of a point).

EDIT: Herman, no. The first location leaks. You're also leaking an effect, and you don't need to null the location since it isn't a local handle, it's a global.
 
Level 11
Joined
Aug 25, 2006
Messages
971
I say we make a 'Purplepoot we miss you' card and pm him it. Where has he been? Probably trying to have a life, I kissed mine goodbye a couple of years ago.....
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
lol ... :wgrin:
Maybe Purple meant its today at night ?

Hermen, you should look at the "Things That Leak" sticky (lol im spamming this for days !).

Every time you set a Location (point) variable or a Unit Group variable, it doesn't remove the one you set it to be before but just lets it stay there and eat your memory alive ! (ouch)

And just a tip, in most cases you can just remove a special effect right after it was created (line after line).
This WON'T remove the shown effect to the players but it will remove the leak.
Don't do this only in case you want the special effect to be shown for a long time.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
wd40bomber7 said:
Ice Breath by Slivenon: It was good, but is still rough around the edges. The method of detecting what got hit by the breath/what didn't is a bit too large. It froze dead units, the frozen special effect didn't last as long as the unit was frozen.

I didn't have time to polish it up, and to figure out why do units stay paused, even though I unpaused them........ I shouldn't have submitted anything in the first place....... my guess is that HINDY will win........Maybe I still have time to polish it!! Since Pooty didn't come yet, muahahahaha! :)


Herman, leaks are important in spell making, really important.

It's a little late reply, I know........ (about 2 darn pages :p)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
A whole bunch of ice spawns, and then spirals into the casters point

You could do that extremely easily in GUI

All you need, is one trigger for the start, another for the movement, and another for the end

All ya gotta do is change there pos in a radius, and in a degree, and then give them each one pos to centralize on, and then when they hit, make them die

Maybe you should tack on a unit group check, so the ice explodes when a unit gets too close to it???

Or maybe not even explodes, just deals dmg
Even if you *can* do something in GUI, JASS is a better idea (if you know how to use it), since it's faster, easier to write (again, if you know how to use it), easier to read (ditto), etc.

wd40bomber7: I read the rules, several times, and I came to the conclusion that my import is neither a icon/sound/model nor it boosts my spell effects. So I decided to let the snowball look a bit more snowy with a custom skin.
If this reskinning is against rules, then I would delete the skin and use the tinting color.
Anyways, thank you very much for favoring my spell.
I assumed that was implied, apparently not. However, you don't really get disqualified for that, it basically means that you won't get marked up for it.



DiscipleOfLife - Breath of Frost
  • Idea: 4 points
    While the ability varied from the standard Breath of Frost in some areas (slow, damage cap per target), it was still too much like it to earn full marks.​
  • Triggering: 5 points
    In general the coding was very clean (Though your indenting is still as weird as always :p).​
  • In-Game Playability: 3 points
    Works well ingame, not hard to balance. Also leaves some room for micro while not demanding it, which is nice.​
  • Visual Effects: 2 points
    It looks nice, I like how there are ice shards under the main effect.​
  • Theme: 3 points
    I think it's hard to stray from the theme in this one, but this one definitely didn't either way.​
  • Total: 17 points
    Well coded, works nicely, an old ability with a new twist, nice in general (Except try to go for something totally new next time ;)).

    PS: Apparently vJass doesn't like long map names (mine anyways) and won't save with them - could you please make the name a bit shorter next name? I ended up having to rename it to test it ;)

Castlemaster - Snow Storm
  • Idea: 5 points
    While someone suggested that this was like starfall, it wasn't really at all. Nice and original. Although it reminds me of a passive ability in Age of Myths, you probably haven't played that anyways.​
  • Triggering: 4 points
    There were a few useless BJs hanging around, but not very many, but the main problem was that you had a few leaks (like a group in the Snow Storm trigger).​
  • In-Game Playability: 3 points
    Would be a very nice support spell ingame.​
  • Visual Effects: 1 point
    You probably could've fit in a few more effects (like something falling from the sky, since it's a snow storm!) without problems - right now it wasn't very visual until the units froze solid.​
  • Theme: 3 points
    Fits the theme.​
  • Total: 16 points
    Fairly well coded, but some of the other areas could use work.​

wd40bomber7 - Frost Storm
  • Idea: 4 points
    Fairly original in some aspects, but projectile shields seem to be becoming more and more common - this is definitely not by any lengths even close to the first.​
  • Triggering: 5 points
    Your coding is pretty good now, however you really should stop using CSCache now that you're using structs - if you want to pass one, direct gamecache access is much faster, and can actually matter in a situation with a short-interval timer with a ton of calculations.​
  • In-Game Playability: 2 points
    Works well ingame, except the ice lags behind the caster - if you run away from it, you can even get it completely off your screen fairly quickly! It should keep up to the caster if it is meant to agree with the tooltip.​
  • Visual Effects: 2 points
    The effects suited the spell.​
  • Theme: 3 points
    Yes, this is definitely winter-themed.​
  • Total: 16 points
    Make sure your tooltip agrees more with the spell itself, but otherwise, good job!​

XieLong - Hiemis Viburnum
  • Idea: 5 points
    Nice and original, with the snowman as an interesting twist.​
  • Triggering: 5 points
    No major complains here, but you should try out vJass structs as an alternative to handle vars.​
  • In-Game Playability: 2 points
    Should work ingame, though the balance would be heavily dependent on the terrain type should the game have multiple areas (or multiple maps like in melee).​
  • Visual Effects: 2 points
    The effects suited the spell.​
  • Theme: 3 points
    Winter-themed.​
  • Total: 17 points
    Cool spell, nice job!​

Herman - Snowball Conjuration
Sorry, but your spell was untestably buggy - the first time I tried to use it, I was paused permanently and invulnerable after casting it. I restarted the game and tried again. It worked a few times, then I walked onto dirt, casted it, it failed (obviously), then i walked back onto snow and casted it and the snowballs were stuck. This happened for the rest of the game. This was reproduceable, I did it several times more. Also, the ice demons were firelords renamed, which would cause a TON of confusion if this spell was imported into a map.
You weren't allowed to win this won anyways, since you won the last one.​

Silvenon - Frost Breath
  • Idea: 5 points
    It sounds like another copy of Breath of Frost, but it definitely isn't ;).​
  • Triggering: 4 points
    On purely the technical side, it was coded well, except that the sfx would stay forever if a unit was hit while the effect was already on it (thus leaking)​
  • In-Game Playability: 0 points
    Permanent pause, selectable/attackable casters, and the tooltip was useless =/.​
  • Visual Effects: 2 points
    Nice effects.​
  • Theme: 3 points
    Winter-themed.​
  • Total: 14 points
    Ugh, please bugtest!​

HINDYHat - Benumbing Bolt
  • Idea: 4 points
    It's ok, not totally original though.​
  • Triggering: 5 points
    Nothing huge to complain about.​
  • In-Game Playability: 3 points
    Would be a good support spell, but it would've been better if you added a damage option (in the constants) for more flexibility (won't deduct points for that though, of course).​
  • Visual Effects: 2 points
    Effects worked well.​
  • Theme: 3 points
    Definitely winter.​
  • Total: 17 points
    Pretty good, not your best though.
    PS: It's www.hiveworkshop.com :p (in your readme)​

GhostWolf - Winter
  • Idea: 5 points
    Original, though a bit weird.​
  • Triggering: 4 points
    Integer isn't really needed, since you don't use waits anywhere. Also, why do you ever store Point[Integer+1] if it's unused? Also, there are some useless ifs, ors, etc, in there, and Type of Projectile + Winter Throwers Cast could be merged.​
  • In-Game Playability: 2 points
    It would be rather limited, as it can only target snow. Also, if you didn't target snow, you would still lose the mana from the spell. Finally, it would spam the other players with the 'must target snow' message too.​
  • Visual Effects: 2 points
    Effects worked well for the spell.​
  • Theme: 2 points
    Its name and the fact that it could only be cast on snow fit the theme, but the actual effect didn't as much...​
  • Total: 15 points
    Pretty good, not your best though.
    PS: It's www.hiveworkshop.com :p (in your readme)​


Vote on the winner - Disciple, HINDY, or XieLong.

Also, I think the other spell contest planned for this week will have to be pulled off due to the fact I couldn't even get on until yesterday, and thus half the week was wasted.

Oh and sorry for the typo, that should've said 30 December (Sunday), but Sunday entries are accepted since that was my fault, and it wouldn't be fair otherwise.
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Integer isn't really needed, since you don't use waits anywhere. Also, why do you ever store Point[Integer+1] if it's unused? Also, there are some useless ifs, ors, etc, in there, and Type of Projectile + Winter Throwers Cast could be merged.​
In-Game Playability: 2 points
It would be rather limited, as it can only target snow. Also, if you didn't target snow, you would still lose the mana from the spell. Finally, it would spam the other players with the 'must target snow' message too.
Theme: 2 points
Its name and the fact that it could only be cast on snow fit the theme, but the actual effect didn't as much...



1.Just made the integer so it'll be fully MUI.

2. How could those 2 triggers be merged ? they are totaly diffrent events lol.

3. Just made it a game message because I never learnt how to do those "real" error messages :/
And forgot about mana ^^

4. Ye... no real good effects for winter in wc.


Oh well, I knew I aint going to win so whatever :p
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
I vote for XieLong!

Ugh, please bugtest!

I know, that spell wasn't supposed to be submitted, but it was a shame to throw away the spell I was working hard on just because I didn't have time to debug it (and fix the visual effect). Thanks for the other points, I wasn't expecting you'd evaluate the other stuff if playability was 0 :)

Nice job everyone!! ;)
 
Level 11
Joined
Aug 25, 2006
Messages
971
I'm voting for XieLong.

Oh by the way, the quote you put up there with my name on it was actually said by XieLong. (Not that it matters)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
1.Just made the integer so it'll be fully MUI.

2. How could those 2 triggers be merged ? they are totaly diffrent events lol.

3. Just made it a game message because I never learnt how to do those "real" error messages :/
And forgot about mana ^^

4. Ye... no real good effects for winter in wc.
1. As I just said, it already was.

2. Because you say in the one, order the guy to roar. The next one does something when he roars. Just take out the roar bit and in the first one, put in the contents of the second.

3. You just only display the text to certain people

4. Nah, there are some good ones, like Frost Wyrm Attack and Ice Bolt, it's just that Orb of Destruction (or whatever that was) for example looks a little more demonic than wintery.

Are you even allowed to vote if you weren't a participant? o_O
Why not? The only reason only participants were allowed to vote on the extensions was that it was them who it directly affected. Since this is just a 'whose spell do you prefer' poll, it makes sense to make it public, in my opinion anyways.
 
Level 11
Joined
Aug 25, 2006
Messages
971
LOL This contest ended awhile ago. (Second post on this page) Its just that there was a tie. Were voting to decide who the winner was.
 
Level 1
Joined
Jan 7, 2008
Messages
1
vote

XieLong - Hiemis Viburnum my favourite
i like the snowman so much and it is a quite new idea i think
:wthumbsup:
 
Level 7
Joined
Oct 5, 2007
Messages
118
DimmDeDimm... it's Monday, the day after sunday :D
Uhh, that isn't correct anymore.. it's allready thursday :)
 
Level 7
Joined
Oct 5, 2007
Messages
118
The rep... than I would have _13_ *hell forbid*

First thing I learned now about the contest: The organizer is not thaat on time ^^
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Think about the precentages ! its about 33% of rep for you (1 rep for 3 comments), now look at my rep and comments and be happy >.<

People never give me rep -.-

But oh well I don't care...

Actualy I do...

No I don't you stupid !

Yes I do you @!%@% !!!

Ok im going to the psycholog :p
 
Status
Not open for further replies.
Top