Good stories are inseparable from good personas. Like books and movies, video games also require personas with interesting behavior. For example, the protagonist in Braid (always the best-selling platform game) can manipulate time. The game is made to stand out by clever behavior.
Behavior is the soul of any video game, adding the behavior to the lazy sprite implemented in the previous installment for Snail Bait will immediately make the game more interesting, as shown in Figure 1:
Figure 1. After completing this article, the state of Snail bait
Recalling the Sprite object section of the previous article, Snail Bait's Sprite did not achieve its own activities, such as running, jumping or angry. Instead, Sprite relies on other objects (called behaviors ) to control operations.
Fig. 1 shows the snail's act of shooting a snail bomb. Other behaviors that cannot be seen in the static image in Figure 1 include:
Running villain
Buttons move back and forth on the platform
Rubies and sapphires shine brightly
Table 1 summarizes these behaviors:
Table 1. The behavior discussed in this article