Suggested Formal Description of the Behavior/AI of Sharks

J Young Kim

New Member
Contributor
Design
Note: The Behavior/AI described in this entry is describing a more realistic shark. If the Terasology community wants to create a shark which is just plain aggressive against the player no matter what, then the default behavior should be set to attack humans on sight, and keeping attacking the humans until the shark is low health or dies.

Sources Used for this Entry:
Default Behaviors
  • Default/Idle: By default, the shark will be exhibiting the swimming behavior. In terms of aggressiveness, the shark will be passive, unless the player or another animal attacks it. In other words, sharks will just swim by the player if the player hasn’t done anything to it. However, a shark’s aggressiveness level will change due to situational behaviors (explained in the latter part of this entry). With that being said, the shark will only break out of its default state when a need is imposed (http://forum.terasology.org/threads/ai-crowd-simulation.1682/) or if there a situation which causes the shark to exhibit another behavior.

  • Swimming: Naturally, sharks mostly spend their time swimming in the ocean. The swimming animation will consist of the tail of the shark moving left to right in a nice slow and paced manner, while the body of the shark remaining relatively still. While swimming, the shark will be travelling around the ocean with no bounds, or in other words, traversing vast amounts of distances.

  • Eating: Sharks just bite into their prey and take off chunks of flesh. However, animating such an occurrence would be too violent, and not be suitable for younger audiences. Thus, to exhibit this behavior, the shark will just damage the prey, and once it kills the prey, then it’ll be considered that the shark ate the prey. The eating behavior should only occur when the shark is hungry.

  • Breathing: Unlike land animals, the action of breathing will be visible for sharks. Breathing, being an act necessary to survival, will be exhibited by the shark no matter what behavior or situation (unless dead) the shark is in. The animation for breathing would be more like the gills of the shark ‘pulsating.’
  • Sleeping: Sharks do not sleep per say, they have active and inactive moments during their day. We can assume the active portion to exhibit the default/idle behavior, and we must define the inactive moments. The inactive moments of sharks vary, since some species can rest without moving, while some require active movement to allow water flow through their gills. For simplistic purposes, we will have the sharks breathing on the ocean floor without moving during its inactive moments. Thus, when the shark is feeling tired, the shark can go to the ocean floor and just stay there. Sharks don’t have eyelids, so please don’t have them close their eyes when they are resting.

  • Traversing: Sharks are very known to travel huge distances. Sharks are not known to stay in a certain area (although they can return to certain areas during certain parts of the year). Sharks, one of the top species in the food chain, will traverse throughout the ocean without worry. Thus, the sharks will just travel the whole ocean if it pleases. To make traversing less random, we can have it so that sharks will tend to be in places where there’s a lot of food for the shark. For the player’s eyes, if a player finds a shark, the player may not be able to find sharks if a few months passed due to the traversing nature of sharks.
Situational Behaviors:

  • Scent of blood: Sharks have a keen sense of smell when it comes to blood. When a shark smells blood, the shark will track down the bleeding living being and attack it. Sharks should only be able to sense blood from a maximum radius away, and the “bleeding” of the player will be triggered when the player takes any sort of damage (aside from drowning effects) when in the ocean. Thus, if the player takes damage (except when taking damage from drowning effects), and the shark is X blocks away from the player, then the shark will track and follow the player and attack the player. However, if the player comes out of the water before the shark finds and attacks the player, the shark will go as closest as it can to the player, and return to its regular life after X seconds. However, the attack will exhibit the “Abandon Attack on Humans after Initial Bite” behavior.

  • Abandon Attack on Humans after Initial Bite: Unlike how Hollywood portrays humans, it is theorized that sharks do not like humans as food. After the shark attacks the player for whatever reason (blood scent, player was on a surfboard, etc.) other than the player attacking the shark first or if the shark is super hungry, the the shark will attack initially, then leave. Depending on the shark, the first bite can prove fatal (i.e. the damage of a bite from a large shark would be different from a smaller shark). Thus, if the shark is attacking the player for reasons other than being extremely hungry or was provoked first, then after the first bite, the shark will return to its passive nature. However, the shark will not abandon an attack if it’s starving, and desperately needs food.

  • Circling around Prey: Sharks are very curious creatures. Sharks will circle around anything they find to be of interest. For instance, when a player has a shiny object, and the shark is not hungry, the shark will just circle around the player. Thus, if the shark finds an object to be interesting, the shark will just circle around it.

  • Attack From Below: A common attack method of sharks is to attack from below. This behavior should only be exhibited when the shark is hungry, and has its eyes set on a target to kill. The shark will go beneath the prey, and then shoot almost straight upwards and attack the prey. For this type of attack, we can assume that sharks will deal large amounts of damage. Thus, if the shark is hungry and has its eyes set on a prey, then the shark will go below the prey and then shoot upwards to attack it, which will result in massive damage dealt to the player (the damage should be tweaked so that the player doesn't die instantly).

  • Following Electric Pulses: Sharks navigate using Electroreception, meaning it uses electricity pulses to guide itself across the ocean. Although unrealistic, the player can attempt to track sharks by placing a device which would mimic the electric pulses emitted by seals (favorite food of shark). Then the players can do whatever they please with the sharks they’ve gathered. Thus, if there’s an electric pulse, and sharks are X (a large value) distances away, then the shark will approach the device emitting the pulses.

  • Aggressive Mode: Aggressive mode is a behavior exhibited if a player or animal attacks the shark. Aggressive mode is when the shark will attack the aggressor and fight until the shark or the aggressor dies. However, if the aggressor happens to escape to land, then the shark will forget about the incident. Thus, if a player or animal attacks a shark, the shark will be aggressive and constantly attack the player or animal until one of the dies or if the player or animal escapes to the surface.
  • Attacking humans on surf boards: This is when Terasology implements the idea of surfboards. The image of a seal (favorite food of shark) and a human on a surfboard looks identical from under the water, leading the shark to attack humans on surfboards accidentally. Thus, if the human is on a surfboard and there is a hungry shark, the shark will attack the player and will abandon the attack after the initial bite unless if the shark is extremely hungry.

  • Attacking Humans (even after initial bite due to hunger): Sharks, when hungry, will not be picky about food. When the shark is extremely hungry, the player will also be attacked. In other words, it’s default behavior would change to an aggressive mode. Thus, if the shark is starving, then the player will also become a potential prey for attack and consumption. The player can decide if the shark is hungry if it’s very fast and active in the water (searching for food).

  • Bright Color/Shiny Attraction: Sharks are very known to be attracted to bright colors or shiny objects. Bright colors can be defined to be objects that have the colors such as orange or yellow. Shiny objects can be stuff such as metal armor, tools, etc. Sharks are attracted to these colors because the sharks think that only fish scales can have bright/shiny colors. However, sharks should only be attracted if they are hungry, since it makes no sense for a shark to chase fish if it’s full. But if it’s curious about the object, then it’ll circle around the player. Thus, if the shark is hungry, and the player has bright colors or shiny objects on himself or herself, then the shark will attack. However, the attack will exhibit the “Abandon Attack on Humans after Initial Bite” behavior.
 
Last edited:
Top