Hook Pro 5v5 Game Development (inspired from Dota2’s Arcade)

Hook Pro 5v5 is a 5 versus 5 game. Player controls a Pudge (Butcher) Character with various spell to use like: Meat Hook. The two teams faces off on a rectangular map divided by an uncross-able division. This game is inspired from Valve Corp.’s DOTA2 Arcade Game ‘Pudge Wars’ and ‘1 Hook 1 Kill’.

[Android App Link]

  • Pre-Unity Engine Phase

– Idea: Replicating Dota2’s Arcade “1 Hook 1 Kill” or “Pudge Wars” for Android devices.
– Get Pudge 3D Model & Texture form Dota2’s official website. All assets by Valve Corp. are provided free for personal use and project use (limitation on commercial use limited to Youtube videos)
– Make 3D lowpoly Map and hand paint it; basic Main Menu UI leading one click directly to game.
– Make our Character have Humanoid Animation in Unity, so that we can use default walk, run animations.

  • Scripting Player (+ UI)

– A fixed joystick for movement. Basically gives vector direction and magnitude to TPC (Third Person Character Controller).

void Update()
{
Vector3 moveVector = (Vector3.right * joystick.Horizontal + Vector3.forward * joystick.Vertical); //movement vector

if (moveVector != Vector3.zero && !hook && !earthbound)
tpc.Move(moveVector.normalized * moveSpeed, false, false); //movement given to TPC

else if (earthbound)
tpc.Move(Vector3.zero, false, false); //not to move when affected by earthbind

else
tpc.Move(Vector3.zero, false, false); //not to move when no input from joystick
}

– Powers (here: Hook, Earthbind, Blur)

Above is ‘hook’ coroutine which does hook animation as well as calculates all values in and out in this process. Usually I properly comment and write neat readable code, but for personal projects…

  • Scripting AI

Here comes the difficult part: MAKE AN AI to act as close as human does. Before moving towards scripting, here are few pre-built things that are required.
– Nav Mesh Agent and Navigation Area Baking
– TPC Movement
– Colliders
Here is the partial script code because it is too big.
– The function “RandomNavmeshLocation” is for AI’s random movement and also it avoids the character collision with allies.
– The function “GetDistance” calculates distance between this character and allies/enemies. The ally distance is calculated to avoid collision and enemy distance is calculated for hook purpose. If a particular enemy is withing range of hook and hook ability is available, initiate the “Hook” Coroutine.

  • Future: Multiplayer

– Currently the project include integration of Google Play Games Services (i.e. shows Leaderboards and Achievements)
– The future update of the project will include Online Deathmatch rooms for online play. (Integrated with Photon, currently in progress)

Leave a Reply

Your email address will not be published. Required fields are marked *