← Back Published on

A Reel Good Day

A Reel Good Day was made for the Brackeys Game jam with the theme "Nothing can go wrong...". The concept of our idea was that nothing can go wrong during a casual day of fishing. but then suddenly the player is thrown into a bos battle with a kraken.

the project was made with me as programmer, Grabriella Besleaga as designer, and Max Flooren as artist.

Things I worked on:

  • Player Movement
  • Kraken AI
  • Fishing Minigame

Player Movement

The very first thing I started working on was the movement of the boat. the movement needed to feel close to driving a speed boat but not take me so long that I would spent the entire week on it.

First whenever there is movement inputs, I store the X and Y value. this is later used to angle the boat whenever the player makes a turn.

Afterwards I use a pawn floating movement component to propel the player forward and I rotate the actor to turn the player.

The "Calculate Rotation Modifier" macro makes it so the players turn speed will become higher the faster they are moving.

On tick the boat is being angled on tick. This originally was triggered when movement input was triggered. but this caused problems when the player suddenly stopped giving input and the boat would no longer angle back to its original position. So instead of spending more time on making an optimized version, I decided to put it on tick to cut down on time.

In "Angle boat based on movement", after getting the new angle for the boat, I set the boat rotation and shift the camera slightly in the direction the player is turning. this gives the player more visiblity where they are going.

To smoothen the turning of the boat, I have "Current Turn Modifier" move between 1 and -1 depending on if the new Y input is higher or lower than the old on.

Then to calculate the final turn angle, I multiply the maximum turn angle with the turn modifier and with how fast the player is moving.

The X angle gets flipped when the player is in combat because we had a funny idea to have the boat be 1 model. the fisher would, when combat starts, flip the boat over revealing there was another boat underneath with a harpoon. this came back to bite me later on, as I had to take into consideration if the boat was flipped. Thinking back on it, this gimmick probably costed more unnecessary time loss than it was worth.

To make it easier for the designer to tweak the boat movement. I made a quick overview of all the variables that can be changed and what they do.

Kraken AI

Before I started Programming the behaviour of the Kraken. I first made a quick overview of the krakens behaviour.

Spin Attack:

Slam attack:

For the default attacks I first make sure the kraken is not doing its diving attack, and he is not in the fishing animation. 

afterwards, It chooses a random ability by setting an index parameter with a value between 1 and 3. then it will trigger the spin attack at index 1 and the slam at any other index. this caused the slam to happen more often.

Dive attack:

For the dive attack I re-use the same spawn tentacles task as the slam attack but with increased parameters. The dive itself is done with 2 tasks, one where it moves the kraken underwater, and the one where it emerges which also sets IsDiving to false returning the kraken to its default behaviour. Upstage makes the kraken's default behaviour more difficult after every dive. 

Fishing minigame:
When the kraken's hp reaches 0, the player will have to hit them one more time, which will start the fishing minigame. this will remove all the currently active tentacles and have the kraken dive to escape the player. Using an event dispatcher the kraken waits for when it is caught which will emerge him again as if he is fished out of the water. Because of the limited amount of time, this was done it save time on animations.

Fishing Minigame

The fishing logic is located in 2 areas. the player sends the input to the fishing widget and holds the amount of fish caught.

And the fishing widget handles all the other logic. The fishing widget functions by using 2 sliders to represent the player bar and the fish. and it uses a progress bar to show the catching porgress.

The progress bar goes up or down dependant on if the fish is inside of the players bar.

This is done by calculating the difference between the fish slider and player box slider as both sliders have the same parameters. 

The fish gets moved by using a timer with a random time frame to change its destination. then it will lerp to the new destination before changing destination again.