• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Homegrown AI

In this section we'll talk about creating your own AI, as opposed to using AI algorithms found elsewhere. The information presented here does not even scratch the surface of learning how to create any AI—that's another subject for a much longer, more technical book. Here the information covers a specific AI.

To introduce you to the kind of script we're going to discuss, from the Chapter09 directory on the CD open shark_attack.swf, which should look familiar from Chapter 7, “Tile-Based Worlds.” Shark Attack! is an isometric tile-based-world game, with some AI enemies, that I created for a company called Simply Scuba. You are the red fish. The goal is to collect the key and go to the door. Collect coins and objects as you go, for more points. Watch out for the sharks, though; they are the enemies. Double-click the SWF file to open it. Play a few levels (there are only four included) and notice the behavior of the sharks. They are controlled with a fairly simple but effective AI. In this section you will learn how an AI very similar to this was created.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint