development update #3
Hello everyone. We are still on track to release Fishery on the 26th, (in 5 days. aaahhhhhh!). The game will unlock at approximately 10:00 PDT, or around 19:00 for most Europeans. I say "approximately" because even though we set the exact date and exact time of the release into the steam system we actually have to personally press the release button.
Today we will have a technical look at the fish of Fishery. Next week we will give you an exact list of all the species of fish in the game at the moment and a rough list of the fish we plan on adding as well as fish-related features of the game.
Animation:
As always there is more than one way to solve this problem. We have chosen to go for a hand animated/keyframed approach.

The above animation show a swim cycle for the "Tiger Barb" fish. This particular animation is a more intense and rapid swim (though it might look slower in the gif) which will be played when the fish is trying to get somewhere faster than usual. There are other animations like "slow/casual swim" and "hanging around/idle". As we develop the game further we will make these animations better and add more variations to them. for instance when a fish is sick or near death it's animations must reflect that state of being. that is a fun creative challenge because it means we have to come up with the fish equivalent of a limp. Each fish has it's own hand crafted set of animations. There is no copy and paste of keyframes. They all look similar because they are all fish but we animate based on their body shape and length and visual personality. It just makes it more fun and brings more value for the players.

Floppiness:
This is probably the most important thing to get right. When a fish is swimming and changing direction it's body bends. This gives a very nice smooth feel to their movement and without it everything feels wrong and rigid. This is not done with physics. We create different animation poses of "body bend" and then blend between them based on the difference in position and rotation of the fish over time.

Obstacle avoidance:
Our fish can detect when something is in their way and will try to change their direction in order not to crash into it. This is a simple concept that can be quite tricky to get right. The way we do it is to shoot a little laser beam from the nose of the fish and if it detects an object or the glass of the aquarium it then shoots more laser beams in multiple directions until it finds a direction that is not obstructed by an object. Once it finds this direction it then begins to move towards that direction and thus avoid smacking it's face into a rock. The above image shows this being done across multiple frames.

Flocking:
We cannot make a game about fish if we cannot have them flocking around. The techniques and algorithms for flocking have been around for a long time and more or less everyone in computer graphics programming has encountered or tested something to do with flocking. It is very simple and follows only a few rules.
1) Fish should try to move towards each other to form a group.
2) they should not get too close, personal space is important,
3) they should all be heading in the same general direction.
If you simulate that over time with a few tweaks then you can get some nice flock-like movement. In Fishery we have added a few more rules to increase CPU performance and to make things visually more interesting. For instance each species has a maximum flock size. In the above image the "Sunburst Platy" species has a maximum flock size of 6, which means if you have 24 fish of that species at once in your aquarium they will split off into 4 distinct groups rather than just one big lump of fish. Each group will swim in different directions and visually it will be more interesting. There will of course be some fish species that have much larger flock sizes and fish that are very anti-social that only swim by themselves.

The image above shows a visual representation of the flocking forces I talked about before. Red represents the force of that stops them being too close together. Dark blue shows the force that keeps them in a group, pink is showing general direction they are all facing and light blue shows the direction towards target for the whole flock to follow which is shown as a blue sphere.
And that is this week's update. As the release is next week we will be posting stuff here and in the forums a little more often so keep a look out.
Have a good weekend.
The Fishery Team
Today we will have a technical look at the fish of Fishery. Next week we will give you an exact list of all the species of fish in the game at the moment and a rough list of the fish we plan on adding as well as fish-related features of the game.
Animation:
As always there is more than one way to solve this problem. We have chosen to go for a hand animated/keyframed approach.

The above animation show a swim cycle for the "Tiger Barb" fish. This particular animation is a more intense and rapid swim (though it might look slower in the gif) which will be played when the fish is trying to get somewhere faster than usual. There are other animations like "slow/casual swim" and "hanging around/idle". As we develop the game further we will make these animations better and add more variations to them. for instance when a fish is sick or near death it's animations must reflect that state of being. that is a fun creative challenge because it means we have to come up with the fish equivalent of a limp. Each fish has it's own hand crafted set of animations. There is no copy and paste of keyframes. They all look similar because they are all fish but we animate based on their body shape and length and visual personality. It just makes it more fun and brings more value for the players.

Floppiness:
This is probably the most important thing to get right. When a fish is swimming and changing direction it's body bends. This gives a very nice smooth feel to their movement and without it everything feels wrong and rigid. This is not done with physics. We create different animation poses of "body bend" and then blend between them based on the difference in position and rotation of the fish over time.

Obstacle avoidance:
Our fish can detect when something is in their way and will try to change their direction in order not to crash into it. This is a simple concept that can be quite tricky to get right. The way we do it is to shoot a little laser beam from the nose of the fish and if it detects an object or the glass of the aquarium it then shoots more laser beams in multiple directions until it finds a direction that is not obstructed by an object. Once it finds this direction it then begins to move towards that direction and thus avoid smacking it's face into a rock. The above image shows this being done across multiple frames.

Flocking:
We cannot make a game about fish if we cannot have them flocking around. The techniques and algorithms for flocking have been around for a long time and more or less everyone in computer graphics programming has encountered or tested something to do with flocking. It is very simple and follows only a few rules.
1) Fish should try to move towards each other to form a group.
2) they should not get too close, personal space is important,
3) they should all be heading in the same general direction.
If you simulate that over time with a few tweaks then you can get some nice flock-like movement. In Fishery we have added a few more rules to increase CPU performance and to make things visually more interesting. For instance each species has a maximum flock size. In the above image the "Sunburst Platy" species has a maximum flock size of 6, which means if you have 24 fish of that species at once in your aquarium they will split off into 4 distinct groups rather than just one big lump of fish. Each group will swim in different directions and visually it will be more interesting. There will of course be some fish species that have much larger flock sizes and fish that are very anti-social that only swim by themselves.

The image above shows a visual representation of the flocking forces I talked about before. Red represents the force of that stops them being too close together. Dark blue shows the force that keeps them in a group, pink is showing general direction they are all facing and light blue shows the direction towards target for the whole flock to follow which is shown as a blue sphere.
And that is this week's update. As the release is next week we will be posting stuff here and in the forums a little more often so keep a look out.
Have a good weekend.
The Fishery Team