Game Overview Multiplayer Aspects of the Game Game Code Possible Game Enhancements Points to Remember Nine-ball is just one of the many types of pool games but is probably the most popular among professional pool players. Most nonprofessionals, at least in the United States, tend to be more familiar with 8-ball. I programmed 9-ball instead of 8-ball because 9-ball only uses 10 balls, as opposed to the 16 used in 8-ball. Through my tests I determined that having 16 balls is much too CPU intensive in Flash. You may remember that in Chapter 2, "The Plan: From Idea to Design," we listed this very problem as a possible programming deterrent; having too many balls on the table could cause a problem that we would have needed to work around. The workaround, in that case, was changing the game. This game requires more knowledge than just about any other game in this book: knowledge of physics, collision detection, collision reactions, and multiplayer systems. If you have trouble understanding the ActionScript used in this game, I recommend that you review the prerequisite chapters. Prerequisites Chapter 4, "Basic Physics" Chapter 5, "Collision Detection" Chapter 6, "Collision Reactions" Chapter 13, "Dissecting a Chat" Chapter 17, "Tic-Tac-Toe: Your First Multiplayer game." That chapter takes you through the basics of creating your first multiplayer game. The multiplayer-specific techniques used there are also used here. They are much easier to understand in a basic game than they are in a complicated game like 9-ball. Appendix C, "The ElectroServerAS Object." Use this as quick reference for definitions of the methods and properties of the ElectroServerAS object. Appendix B, "Multiuser Servers." Read this appendix to gain an understanding of multiuser servers, and specifically to understand ElectroServer and its capabilities, and how to install it. You are expected to know how to start ElectroServer so that the game file in this chapter can connect to it. | |