top of page

SWINGER (WIP)

ABOUT

This is a project that i decided to create to test myself creating new mechanics for games. I thought about creating a type of grapple hook game and how i could implement that in game play, i thought about a player vs player scenario, or an obstacle course type level. However these were very restricting on how you could use the hooks. So i thought of a simple time trial on a large level gave the player the freedom needed to use these mechanics.

GAMEPLAY

 

In this game, the player must switch between the shoot tools:

-Red blocks: Basic projectile

-Blue blocks: forward propelled grapple block

-Green blocks: vertical propelled grapple block

Holding left click will grow a block in front of the player, releasing left click will propel it, for the blue and green blocks, another click will stop the block in its place.

The player uses the red block to knock obstacles out of the way, whilst using the other two to place and then grapple to. 

Pressing 'q' will send a grapple to a block, 'e' will reel the player towards the block, and 'x' will cancel the hook.

The main focus of this project was to create game mechanics that i had never worked with before. So i created a grapple mechanic for the player to swing around the level with. The code screenshots below display the code functionality for the grapple mechanic, it was created with a unity specific joint component called 'configurable joint'.

CODE

The 'CreateJoint()' function configures the configurable joints settings so that the player will be limited to a certain distance away from the hook point, this distance is passed as a parameter to 'CreateJoint()'.

The actual hooking of the player is all created within the 'FixedUpdate()' function. This behaves like the Update function, however it is much better for physics calculations, such as what is taking place within 'CreateJoint()'. 

bottom of page