1. FISHERY
  2. News
  3. development update #24

development update #24

Hello everyone,

It has been an interesting week and we have made some quite important progress. This progress may at first glance appear rather underwhelming but it represents the last major coding problem that needed to be solved in order for the plumbing system to work properly and as you will read further down, it is quite important for the rest of the game.

There is no new build again this week but we promise that next week there will be a new build and it will contain the plumbing system. Then after that, weekly builds will return.



Yes, we have added the ability to pause the game. At first you might think it is not worthy of much praise since almost every game has a pause feature. However as with most things in Fishery it is not as straight forward as you might think and there are reasons we have not been able to do it until now.

For most games, but not all, pausing is achieved by making the main update code loop finish it's execution before it actually updates anything in the game. The camera can't be moved, sometimes the music stops, everything else in the game just freezes because the code to update it is never executed. This depends entirely on how the game engine is programmed of course so it does differ between engines but in the abstract this is more or less how it is done.

In Fishery it is not so simple. For photo mode players have requested the ability to pause the game but retain the ability to move the camera so they can line up the camera to get the perfect shot. We also decided that the music should continue playing whilst the game is paused.

Plumbing mode requires us to pause the simulation that is happening inside the aquarium whilst the player is tinkering with their pipes, regulators and filters. It would be extremely annoying if everything dies in the aquarium whilst the player is plumbing. We need to pause the simulation only for things that are inside the aquarium but keep everything in the plumbing area unpaused and updating correctly.

This requires us to have a few different types of pausing functionality.
- Pause everything including plumbing objects when not in plumbing mode.
- Pause everything except the plumbing objects when the player enters plumbing mode.
- Pause everything including the plumbing objects when the player wishes to pause the game from within plumbing mode.

Then of course there is the unpausing functionality that does things in reverse.
- Unpause everything including plumbing object when not in plumbing mode
- Unpause everything but pause the plumbing objects when exiting plumbing mode.
- Unpause only plumbing objects when the player wishes to unpause the game from within plumbing mode.

suddenly it all looks a bit too complicated. It is a bit complicated but these are the outcomes required for this game.

Each type of object functions in a different way. There is code specific for each object type. Fish, floatable objects like food and medicine are all moved via the physics system. Object velocity is calculated based on forces and collisions and then this velocity is used to move the object every physics frame. Stopping the entire physics system from updating would not be desirable because when the player enters plumbing mode we need the physics system to calculate inter-collisions between plumbing objects and detect if the player is trying to select an object or attach a new object to another. We put objects like fish, food and medicine to "sleep". The physics system then ignores objects that are flagged for sleep and only updates the awake objects.

There are still a few small things to polish with pausing/unpausing. We are still debating exactly how much capability players should have during a paused game. For instance when making big changes to the aquarium design or fixing problems it is probably a good idea that players can just pause things and do their modifications before things go super bad if they are in fact trying to fix a problem. The game is after all supposed to be relaxing. No doubt we will tweak things with your feedback as time goes on.

We are extremely excited to finally get this rolled out. See you all next week with the new build!

The Fishery Team