HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Stone Wall (Spell Session 04)

06-07-2006, 01:28 AM#1
Vuen
This is the winner of Spell Session 04, themed "Terrain Manipulation".

Screenshots show the spell's thumbnail, default configuration on Lordaeron Summer, "Black Wall" configuration on Lordaeron Summer, default configuration on Icecrown Obelisk, and default configuration on Outland respectively.



Stone Wall 1.4

Conjures a wall of stone from the ground.


Features:
  • Contains level-based options for blocking air units, blocking visibility, and whether the spell is channeled.

  • The terrain is deformed progressively to update the shadowmap in realtime, and smooth out the deformation.

  • The wall is made up of randomly scattered peaks to create a very natural-looking terrain deformation.

  • The rock texture applied to the wall automatically matches the tileset used.

  • The terrain is returned properly even when walls overlap with other walls or terrain distortions.

  • Walls resolve properly even if the caster is abnormally removed.
Attached Images
File type: jpgstonewallthumb.JPG (55.3 KB)
File type: jpgstonewall13.jpg (177.6 KB)
File type: jpgstonewallblack.jpg (190.7 KB)
File type: jpgstonewallicecrown.jpg (237.1 KB)
File type: jpgstonewalloutland.jpg (205.9 KB)
Attached Files
File type: w3xStone Wall 1.4.w3x (49.0 KB)
06-07-2006, 12:15 PM#2
erwtenpeller
ace.
06-07-2006, 04:56 PM#3
Blade.dk
There are some things that could be fixed:
  • GetWorldBounds() creates a new rect everytime you call it. Therefore your spell has several leaks. Please fix this.
  • StartTimerBJ could be replaced with TimerStart.
  • The configuration functions could be made constant.

The last two does not really matter, but please fix the GetWorldBounds leak, and I will approve it.
06-10-2006, 07:56 PM#4
Vuen
Whoops. I didn't realize GetWorldBounds() created a new rect every time; I thought it just had one for the bounds and always returned the same one.

Fixed.

I set the rawcode configuration constant, but I left the others not constant because I like the configuration options to be able to depend on a lot of things, like elapsed game time for example. A lot of them also take the target location of the spell as a parameter.
06-10-2006, 08:36 PM#5
blu_da_noob
Constant functions can take parameters, they just can't call other functions.
06-11-2006, 04:29 AM#6
Vuen
Yes of course but if you make the function depend on something like elapsed game time, having the function constant breaks it.

More importantly though, if you're taking a location as a parameter, then the location is different every time so having the function constant is really just slowing it down and leaking memory as it caches every parameter you call it with. Worse, if the game recycles a location, it will return the old value even though the new location points to somewhere else on the map.

Things that actually are constant, like rawcodes, I made constant, but I left open the rest. I also left the gamecache because if the player forgets it's making a cache and creates their own via GUI/BJ, it would return null if the function was made constant. This way it returns the player's new cache.
06-11-2006, 05:38 PM#7
Blade.dk
Well, if the user will edit the functions himself, it should be an easy task to remove the 'constant' prefix.

Anyways, thanks for fixing the GetWorldBounds problem, approved :).
06-17-2008, 05:21 PM#8
Mr.Malte
Wow nice spell.
But for some reason it laggs extremely when the wall rises and if it falls. Does anybody know why, and how to fix it?