Developer's Blog
Register Low Fi Mark Forums Read

Reply
 
Thread Tools
Old 09-20-2010, 04:04 PM   #1
Terresquall
Member
 
Terresquall's Avatar
 
Join Date: Jun 2009
Posts: 314
Blog Entries: 2
Terresquall is offline

Default [ANIMATION] Meat Hook


EDIT: Took out the icon.

Introduction

Meat Hook looks fine and dandy right now, but I can't help realising that its a little... huge. It also looks like the chain is made up of a huge bunch of hooks that are connected back to back, which looks a little weird.



So I went back and tried out some different ways to lay out the links on the hook, and this is what I got.

Meat Hook



I know what you're thinking. It's reminiscent of Pudge Wars,
minus the ugly glaive at the end.


Basically, smaller links make the hook more metallic, with the original huge thing only at the end of the hook. The hook also now leaves a whitish trail, which makes the movement look so much better.

Specifics

While the visuals look drastically different, its actually the result of only several minor tweaks to the overall architecture of the current code for Meat Hook.
  • Reduce the scaling value of all Meat Hook links to 1.
  • Right now, the hook extends by 1 link (40 range) every 0.03 seconds. Because the link size is now (approximately) halved, the hook now extends by 2 links every 0.03 seconds, 20 range apart (for a total of 40 range similarly).
  • Add a dummy link (same model as the other links) at scale 2.3 which travels with the head of the hook, facing the direction where the hook is thrown towards. Making the link travel produces a white motion trail that outlines the hook as seen in the picture.
  • Make the individual links have a fly height of 40 with movement type Flying. The current Meat Hook creeps along the ground (refer to the first picture), clips right through buildings and sometimes moves awkwardly through cliffs. The change puts the Hook at the correct height and lets it arc more nicely across cliffs and over towers/buildings and whatnot.

Misc: Replacing the Impact Effect

This isn't part of the main suggestion, but I think that the current "blood spills out of the enemy" effect doesn't convey the impact that Meat Hook hits its target with well enough. Meat Hook deals obscene amounts of damage, presumably by snagging a target while travelling at high speed, and I feel that this graphical effect is better at conveying the impact than the trace amount of blood that spills out of a target currently.


This is basically achieved by playing the death animation of one of the Meat Hook links at 2 times the original scale (using a dummy unit essentially). It comes with a cool impact sound too.

Testmap

Check out the testmap here. The motion trail is more apparent in life action.

The Code

For those of you who are interested:

Jass:
function Trig_Meat_Hook_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A06W'
endfunction

function Trig_Meat_Hook_Targ takes nothing returns boolean
    return GetUnitAbilityLevel(GetFilterUnit(),'Aloc') == 0 and not (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE) or IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL) or IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)) and GetWidgetLife(GetFilterUnit()) > .405
endfunction

// *******************************************************************************************
// Function that runs every 0.03 seconds. Moves the head link 40 range towards or away from the
// Pudge depending on whether it has snagged a unit. Every time the link moves forwards 40 range,
// a loop is made which creates and instantly saves 2 smaller link units, each 20 range forward of
// the previous link. When it returns, it removes 2 links per iteration.
//
// A pseudo array is used in the hashtable storage system (look out for the lc variable) to ensure
// proper recording and removal of the Meat Hook links.
// *******************************************************************************************

function Trig_Meat_Hook_Tick takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local hashtable gc = udg_HashCache
    local integer s = GetHandleId(t)
    local unit u = LoadUnitHandle(gc,s,1)
    local unit e = LoadUnitHandle(gc,s,2)
    local real r = LoadReal(gc,s,3)
    local real a = LoadReal(gc,s,5)
    local integer i = LoadInteger(gc,s,4)
    local real x = GetUnitX(e)
    local real y = GetUnitY(e)
    local integer lc = LoadInteger(gc,s,9)
    local group g
    local integer l = 0
    local unit p
    local unit dh
    if i == 0 then
        set g = CreateGroup()
        set r = r+40
        loop
            exitwhen l >= 2
            call SaveUnitHandle(gc,s,10+lc,CreateUnit(GetOwningPlayer(u),'n007',x+20*l*Cos(a),y+20*l*Sin(a),GetUnitFacing(e)))
            set lc = lc+1
            set l = l+1
        endloop
        call SaveInteger(gc,s,9,lc)
        call SetUnitX(e,x+40*Cos(a))
        call SetUnitY(e,y+40*Sin(a))
        call GroupEnumUnitsInRange(g,GetUnitX(e),GetUnitY(e),125,LoadBooleanExprHandle(gc,s,6))
        call GroupRemoveUnit(g,u)
        if CountUnitsInGroup(g) != 0 or r > I2R(400+150*LoadInteger(gc,s,8)) then
            set p = FirstOfGroup(g)
            if IsUnitEnemy(p,GetOwningPlayer(u)) and p != null then
                set dh = CreateUnit(GetOwningPlayer(u),'n007',GetUnitX(e),GetUnitY(e),a*57.295827)
                call SetUnitScale(dh,2,2,2)
                call KillUnit(dh)
                call UnitDamageTarget(u,p,I2R(90*LoadInteger(gc,s,8)),false,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_UNKNOWN,WEAPON_TYPE_WHOKNOWS)
                set dh = null
            endif
            call SaveUnitHandle(gc,s,7,p)
            call SaveInteger(gc,s,4,1)
        endif
        call DestroyGroup(g)
        call SaveReal(gc,s,3,r)
        set g = null
      else
          if r > 0 then
              set p = LoadUnitHandle(gc,s,7)
              call SetUnitX(e,GetUnitX(e)-40*Cos(a))
              call SetUnitY(e,GetUnitY(e)-40*Sin(a))
              call SetUnitX(p,GetUnitX(e))
              call SetUnitY(p,GetUnitY(e))
              call SaveReal(gc,s,3,r-40)
              loop
                  exitwhen l >= 2
                  call RemoveUnit(LoadUnitHandle(gc,s,10+lc))
                  set lc = lc-1
                  set l = l+1
              endloop
              call SaveInteger(gc,s,9,lc)
            else
                loop
                    exitwhen l >= 2
                    call RemoveUnit(LoadUnitHandle(gc,s,10+lc))
                    set lc = lc-1
                    set l = l+1
                endloop
                call DestroyBoolExpr(LoadBooleanExprHandle(gc,s,6))
                call RemoveUnit(e)
                call KillTimer(t)
                call FlushChildHashtable(gc,s)
          endif
    endif
    set u = null
    set t = null
    set e = null
    set gc = null
    set p = null
endfunction

// *******************************************************************************************
// Function that runs when the spell takes effect. It creates the head link of the Meat Hook,
// as well as save important values and variables to the Hashtable (like facing angle, references
// to the unit variables etc.
// *******************************************************************************************

function Trig_Meat_Hook takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local timer t = CreateTimer()
    local hashtable gc = udg_HashCache
    local integer s = GetHandleId(t)
    local real a = Atan2(GetSpellTargetY()-GetUnitY(u),GetSpellTargetX()-GetUnitX(u))
    local unit e = CreateUnit(GetOwningPlayer(u),'n007',GetUnitX(u)+40*Cos(a),GetUnitY(u)+40*Sin(a),a*57.295827)
    call SetUnitScale(e,2.3,2.3,2.3)
    call SaveUnitHandle(gc,s,1,u)
    call SaveUnitHandle(gc,s,2,e)
    call SaveInteger(gc,s,8,GetUnitAbilityLevel(u,'A06W'))
    call SaveReal(gc,s,5,a)
    call SaveBooleanExprHandle(gc,s,6,Condition(function Trig_Meat_Hook_Targ))
    call TimerStart(t,.03,true,function Trig_Meat_Hook_Tick)
    set t = null
    set gc = null
    set e = null
    set u = null
endfunction

function InitTrig_Meat_Hook takes nothing returns nothing
    set gg_trg_Meat_Hook = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Meat_Hook, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Meat_Hook, Condition( function Trig_Meat_Hook_Conditions ) )
    call TriggerAddAction( gg_trg_Meat_Hook, function Trig_Meat_Hook )
endfunction

F.A.Qs

Quote:
Could even make it a real hook at the front there, what do you think?
I'm not fond of having the hook at the end personally. It just doesn't ring as resonantly as having a sharp knife edge at high velocity (i.e. pretty ribbon trail) because the hook's sharp edge isn't facing the opponent. Can we make the hook open when it flies and lock when it snags the target? Definitely. But it doesn't look as lethal as a direct knife edge being driven into the target. Not to mention the hook is an extra MSI object, and we have to add a ribbon trail to it for it to come anywhere close to what the current one can provide.
  Reply With Quote
Last edited by Terresquall; 11-06-2010 at 01:23 AM.
Old 09-20-2010, 04:06 PM   #2
Black.Lotus
Member
 
Black.Lotus's Avatar
 
Join Date: Jul 2009
Location: The World
Posts: 4,626
Blog Entries: 1
Black.Lotus is offline
Default Re: [ANIMATION] Meat Hook

Current one just looks better. T-DOWN!!
__________________



Don't like the Switch Mode? Join this group: <Click>
  Reply With Quote
Old 09-20-2010, 04:07 PM   #3
ParaDise.-
Member
 
ParaDise.-'s Avatar
 
Join Date: Jan 2010
Location: Where you need me?
Posts: 2,128
Blog Entries: 1
ParaDise.- is offline
Default Re: [ANIMATION] Meat Hook

Im gonna say T-Up!
without tesmap
__________________
Da Horde always ma home yo know pal? Orcs, taurens, elves or forsaken, As long I'm a troll I would watch yo steps.
  Reply With Quote
Old 09-20-2010, 04:08 PM   #4
Nox.knight
Member
 
Nox.knight's Avatar
 
Join Date: Mar 2010
Location: Suggestions
Posts: 1,331
Blog Entries: 2
Nox.knight is offline
Default Re: [ANIMATION] Meat Hook

The current needs a change. T-up
  Reply With Quote
Old 09-20-2010, 04:23 PM   #5
Schremba
Member
 
Schremba's Avatar
 
Join Date: Jun 2009
Location: Germany
Posts: 3,051
Schremba is offline
Default Re: [ANIMATION] Meat Hook

It looks nice, but have you already tried the missile of ladder Gryphon Rider? If it is sized so it is smaller, it looks a little bit better as a chain. Additionally, I think it would be a nice addition to always play a specific attack animation where he attacks with his hook.
  Reply With Quote
Last edited by Schremba; 09-20-2010 at 04:33 PM.
Old 09-20-2010, 04:39 PM   #6
Zenerik
Member
 
Zenerik's Avatar
 
Join Date: Sep 2009
Posts: 134
Zenerik is offline
Default Re: [ANIMATION] Meat Hook

It's Terresquall, so it's an auto T-up. However, after taking a good look at it; I think you should increase each link's scaling value a bit, maybe to around 1.2, also reduce that of the tip a bit. Right now it looks somehow out of balance. I don't have the time right now so I'll dive into the World Editor tomorrow to see if I can get something or simply demonstrate what I said.

For the concept though, I'd say it's on the "Implement nao!" tier.

Quote:
Originally Posted by Black.Lotus View Post
Current one just looks better. T-DOWN!!
Seriously?! A bunch of Warden's (TA) projectiles staying still in a line with almost no motion whatsoever look better than that?
  Reply With Quote
Old 09-20-2010, 04:53 PM   #7
Shadow Fury
Banned
 
Join Date: Apr 2010
Location: Draining Your Life Juice.
Posts: 10,204
Blog Entries: 2
Send a message via MSN to Shadow Fury
Shadow Fury is offline
Default Re: [ANIMATION] Meat Hook

T-Up!
  Reply With Quote
Old 09-20-2010, 04:55 PM   #8
Niaz
Member
 
Niaz's Avatar
 
Join Date: Jul 2010
Location: On the top score
Posts: 402
Niaz is offline
Default Re: [ANIMATION] Meat Hook

T-up but dont change the blood spill upon impact, thats the cool thing
__________________
/
Because I can
  Reply With Quote
Old 09-20-2010, 05:51 PM   #9
Sven2k
Member
 
Sven2k's Avatar
 
Join Date: Jun 2010
Location: \/arna - |3ulgaria
Posts: 10,703
Blog Entries: 3
Send a message via Skype™ to Sven2k
Sven2k is offline
Default Re: [ANIMATION] Meat Hook

Quote:
Originally Posted by Black.Lotus View Post
Current one just looks better. T-DOWN!!
this
  Reply With Quote
Old 09-20-2010, 08:13 PM   #10
IxamS
Member
 
IxamS's Avatar
 
Join Date: Sep 2009
Location: Argentina
Posts: 512
Blog Entries: 1
IxamS is offline
Default Re: [ANIMATION] Meat Hook

Sexy, t-up!... and current isnt is better
  Reply With Quote
Old 09-20-2010, 08:26 PM   #11
ItIsNight
Member
 
ItIsNight's Avatar
 
Join Date: Aug 2010
Location: Snowy Russia
Posts: 581
ItIsNight is offline
Default Re: [ANIMATION] Meat Hook

Quote:
Originally Posted by Schremba View Post
It looks nice, but have you already tried the missile of ladder Gryphon Rider? If it is sized so it is smaller, it looks a little bit better as a chain. Additionally, I think it would be a nice addition to always play a specific attack animation where he attacks with his hook.
u r right man!

T-up to make it more chain-like. But don't so small chains, it's hard to see and to dodge. Make them some bigger.
__________________
Suggestions of remakes/tweaks:
Skills rescales, , , , ,

Visual suggestions: Akasha's overhaul,

Suggestions of improvements: Interface (gametime/safegold/timer)
  Reply With Quote
Old 09-20-2010, 08:37 PM   #12
Quiesce
Member
 
Quiesce's Avatar
 
Join Date: Sep 2009
Location: Pennsylvania
Posts: 2,777
Blog Entries: 2
Quiesce is offline
Default Re: [ANIMATION] Meat Hook

T-up
__________________
.................................................. .................................................. .................................................. .................................................. ..........


  Reply With Quote
Old 09-20-2010, 09:50 PM   #13
JudasCow
Member
 
JudasCow's Avatar
 
Join Date: Sep 2010
Posts: 111
JudasCow is offline
Default Re: [ANIMATION] Meat Hook

Always wanted to try changing this, but I have no idea how to mess with the coding. :P

Anyways, this looks fantastic. Doesn't really matter if you tweak the size of the chain links, it looks way better than a bunch of the exact same triangles.

Thumbs up.
  Reply With Quote
Old 09-20-2010, 09:54 PM   #14
KuroNeko
Member
 
KuroNeko's Avatar
 
Join Date: Jun 2009
Location: honolulu
Posts: 2,459
Blog Entries: 12
KuroNeko is offline
Default Re: [ANIMATION] Meat Hook

T UP


if possible, change the end of the meat hook to look like a hook or at least not-a-spear-head
__________________
  Reply With Quote
Old 09-20-2010, 09:55 PM   #15
Black.Lotus
Member
 
Black.Lotus's Avatar
 
Join Date: Jul 2009
Location: The World
Posts: 4,626
Blog Entries: 1
Black.Lotus is offline
Default Re: [ANIMATION] Meat Hook

It is too small.
The color doesn't fit to Pudge.
Who cares about some missing movements? I don't.


The current one already fits. If you want to change something maybe make the current animation better with your moving thing...
__________________



Don't like the Switch Mode? Join this group: <Click>
  Reply With Quote
Old 09-20-2010, 10:06 PM   #16
KuroNeko
Member
 
KuroNeko's Avatar
 
Join Date: Jun 2009
Location: honolulu
Posts: 2,459
Blog Entries: 12
KuroNeko is offline
Default Re: [ANIMATION] Meat Hook

Quote:
Originally Posted by Black.Lotus View Post
It is too small.
The color doesn't fit to Pudge.
Who cares about some missing movements? I don't.


The current one already fits. If you want to change something maybe make the current animation better with your moving thing...
ATM it's not a hook, nor is it even a chain, really...
__________________
  Reply With Quote
Old 09-20-2010, 10:20 PM   #17
NoThlnG
Forum Staff
 
NoThlnG's Avatar
 
Join Date: Jun 2009
Location: Nowhere
Posts: 14,371
Blog Entries: 8
Send a message via MSN to NoThlnG Send a message via Skype™ to NoThlnG
NoThlnG is offline
Default Re: [ANIMATION] Meat Hook

T-Up for chain but T-D for impact. IMO, current impact fits good already
  Reply With Quote
Old 09-20-2010, 11:28 PM   #18
Captain Planet
Member
 
Captain Planet's Avatar
 
Join Date: Jul 2009
Location: Planet Earth, taking pollution down to zero
Posts: 15,680
Blog Entries: 10
Guide Writer Award Guide Writer Award 
Send a message via MSN to Captain Planet Send a message via Skype™ to Captain Planet
Captain Planet is offline
Default Re: [ANIMATION] Meat Hook

Terresquall thread.

Instant approval
  Reply With Quote
Old 09-21-2010, 01:00 AM   #19
Siraraz
Member
 
Join Date: Jun 2009
Location: Earth
Posts: 1,751
Blog Entries: 4
Siraraz is offline
Default Re: [ANIMATION] Meat Hook

Ew. Code tags for JASS? Use [JASS][/JASS], preferably in spoilers so you don't kill the page with the code's huge length. Also if you are going to compare, have the angle on both versions the same, bird-eye (or almost).

After testing;

I wasn't that impressed, first impression was something akin to a fishing spear or some sort of long bone, I dunno what other people would have imagined :P. As stated in this thread before, the giant hookhead really looks out of proportion, it just doesn't flow with the rest.

And by motion I thought the entire hook was in motion, rather than some static zombie-like chains spawning with just one spearhead causing the trail. It's like the hook links are being layed down one by one.

Quote:
I know what you're thinking. It's reminiscent of Pudge Wars,
minus the ugly glaive at the end.
I beg your pardon =)?

Quote:
It is too small.
Agreed there. I think adding the ribbon trail is the right direction, not the scale.

Quote:
The color doesn't fit to Pudge.
Then what does? Nothing fits in DotA.

Quote:
Who cares about some missing movements? I don't.
Who cares if you don't care? I don't.
  Reply With Quote
Last edited by Siraraz; 09-21-2010 at 12:29 PM. Reason: Jass Tags fold already? LOL.
Old 09-21-2010, 04:50 AM   #20
Terresquall
Member
 
Terresquall's Avatar
 
Join Date: Jun 2009
Posts: 314
Blog Entries: 2
Terresquall is offline
Default Re: [ANIMATION] Meat Hook

Quote:
T-up to make it more chain-like. But don't so small chains, it's hard to see and to dodge. Make them some bigger.
Actually, it is impossible to dodge Meat Hook on reaction after seeing the hook. It simply moves too fast to do so. At 1000 range, Meat Hook takes 0.7 seconds to travel the full distance. Assuming you see the hook right as he launches it (which in itself is highly improbable, as 1000 range almost as long as the entire screen length), and optimally take 0.3 seconds (thats the best case scenario) to react, you still only have 0.4 seconds to move your mouse, click a point and wait for your hero to move. By the time you issue an order to move, your hero has about 0.1 to 0.2 seconds to move out of the way. Even at 522 movespeed, you'll be lucky to move about 50 to 70 range away, but Meat Hook has a hit area of 125--more than enough to snag you regardless of that offset.

Note that the above scenario itself assumes the best case scenarios, which aren't likely to happen in themselves. Most of the time at max range you won't even see when Pudge launches his hook, and will take more than 0.3 seconds to react as a result. The remaining time is barely enough for the player to even move his mouse to issue a move order.

Most Meat Hook jukes are done before the hook even comes out. Jukes are usually done when a player feels that the Pudge is about to launch his hook, and whether you get hooked or not is usually set in stone after the hook is thrown. That is why Meat Hook dodging doesn't happen 100% of the time--because its largely based on intuition.

The point here is that it doesn't really matter if the hook is really harder to see, because the players seeing the hook aren't really determining factors to whether they get hit by it.
  Reply With Quote
Reply
  Defense of the Ancients Suggestions Visuals


Forum Jump

Thread Tools