وبلاگ بلیان

PHP Game Programming

معرفی کتاب «PHP Game Programming» نوشتهٔ Matt Rutledge، منتشرشده توسط نشر Course Technology PTR در سال 2004. این کتاب در 20 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «PHP Game Programming» در دستهٔ بدون دسته‌بندی قرار دارد.

... not that good. It's unfortunate that the only book dedicated to php game programming really falls short on many levels. The main problem with this book, is it jumps from the very basics of php and mysql to extremely advanced topics all within a matter of a few pages... entirely omitting users of intermediate php/mysql knowledge. The book has a chapter about creating a MMO (my sole purpose for buying the book).. yet it doesn't tell you anything about HOW to make the MMO. The source code for the MMO has 150 files, yet the chapter is only 20 pages long... The author does a great job explaining how to use php and mysql.. including great instructions for installation... the problem is that other books dedicated to learning these subjects do it better. This book should be about learning how to program a game in php/mysql, and it's not. This book is a book about learning the basics of php/mysql with some source code WAY more advanced than anything the book will cover. If you're advanced enough to decipher the authors code, then you don't need this book in the first place becaues you could already make games if you wanted. This book contains no content on game planning or design. The author write effectively.. I'd love for him to take a second pass at writing this... perhaps sit down and write a book dedicated to teaching you how to program a game. The MMO that comes within the book is certainly complex enough to deserve a book of it's own. Ultimately, this book is 280 pages long.. you cannot teach someone how to make a game in php/mysql in 280 pages. I'd love to see an author write a book that illustrates making a game from concept to design to code... the how and the why of the processes, and have it return a good game you can use as a foundation for creating other game. I really looked forward to getting this book before it was published. Now almost a year later, having been through the book 3 times fully, I can say I'm no closer to having any idea how to make a game than when I started. Team DDU PHP Game Programming 1 Cover 1 CONTENTS 9 Introduction 14 Part I Introduction to the World of PHP 18 Chapter 1 So What Is All This Server Stuff? 20 Understanding the Client/Server Relationship 20 The Web Server 22 Sessions and Session Variables 22 TCP/IP 30 Installing the IIS Web Server 31 Installation on Windows 2000/XP Professional 32 Installation on Windows 98 34 Installing the Apache Web Server on Windows ME/XP 35 Installing the Apache Web Server on UNIX 36 Chapter 2 Waging the Configuration War 40 The Platforms 40 Building and Installing PHP on UNIX 41 Installation on Windows for IIS/Apache 43 Installing the Windows Extensions 46 Testing Your Installation 46 Chapter 3 I Have Conquered the Server, Let Me at the Code! 48 The Basics of the HTML Tag 48 The Almighty HTML Document 49 The HTML Body 50 Graphics and HTML 53 The File Formats 54 Using the File Formats in Your Document 56 Tables 58 Layouts, Tables, and Graphics 61 Creating Forms for Input 65 Conclusion 68 Part II Enter the Language 70 Chapter 4 Say Hello to PHP 72 Creating a PHP Page 73 Data Types 74 Type Casting 75 Variable Variables 75 Constants 75 Naming Conventions 76 Functions for Variables 77 Functions for Strings 78 printf() and sprintf() 81 Regular Expressions and Pattern Matching 83 Using the Regular Expression Functions 85 Processing Forms with PHP 88 Conclusion 93 Chapter 5 Operators, Statements, and Functions 94 Operators 94 Arithmetic Operators 95 Comparison Operators 95 Logical Operators 96 Ternary Operator 97 Bitwise Operators 99 Variable Assignment Shortcuts 102 Operation Precedence 103 Statements 103 if Statements 105 The switch Statement 107 while and do¡ 110 The for Loop 111 Functions 111 Passing Parameters to a Function 112 Recursion 115 The Magic of Including Files 116 Conclusion 117 Part III Arrays, Games, and Graphics 118 Chapter 6 Arrays! 120 Initializing Arrays 121 Using Strings for Indexes 122 Looping through Sequential Arrays 123 Looping through Non-Sequential Arrays 125 Multi-Dimensional Arrays 127 Sorting Arrays 129 Your First PHP Game 134 Conclusion 149 Chapter 7 Playing with Chess and Databases 150 Non-Relational Databases 151 Creating and Opening a Database 151 Looping through the Database 153 Inserting an Entry into Your Database 154 Updating an Entry in Your Database 156 Deleting an Entry from Your Database 157 Chess Programming: A Quick Overview 157 Starting the Chess Game 158 Working with the Pieces 160 Getting the User Input and Modifying the Database 168 Conclusion 173 Chapter 8 GD Graphics Overview 174 What Is GD? 174 Installing GD 175 Creating and Using a New Image 177 How to Use Colors 178 Allocating Colors to an Image 178 Filling the Image 179 Setting Your Transparent Color 180 Converting a True-Color Image to a Palette Image 182 Counting Colors in an Image 182 Retrieving a Color at a Point 183 Drawing Basic Shapes on Your Empty Canvas 184 Pixels and Lines 184 From Lines to Rectangles 186 From Rectangles to Polygons 189 From Polygons to Arcs and Ellipses 191 Creating Images with Text 196 Saving Your Images 201 Using Existing Images 202 Conclusion 209 Chapter 9 Creating Battle Tank and Using Dynamic Terrain 210 Planning Battle Tank 210 Creating the Graphics 212 Creating the Game Logic 213 Creating Dynamic Terrain 222 Conclusion 226 Part IV Extras and Final Projects 228 Chapter 10 PHP and Sockets 230 Socket Basics 230 Creating a Server 237 Creating the Client 240 Integrating Sockets with Battle Tank 241 Conclusion 245 Chapter 11 Kiddy Cartel-Creating Your Own MMO 246 Installing mySQL 247 Relational Databases: A Quick Rundown 248 Kiddy Cartel: The Rules and Specifications 250 Creating Your Base Actions 252 Creating a Command with Sub-Commands 257 Creating a Command without Sub-Commands 262 Look at All the Commands¡ 265 Conclusion 273 Chapter 12 Building Your PHP Skills 274 PHP and Ming 274 How to Create a Flash Movie 276 Drawing to Your Flash Movie 279 Filling Objects with Ming 282 Adding Animation to Your Flash Movie 288 Adding ActionScript to Your Flash Piece 292 Conclusion 296 Part V Appendixes 298 Appendix A HTML Language Reference 300 Appendix B PHP Language Reference 326 Appendix C Support-Debugging Applications 346 Syntax Errors 346 Semantic Errors 348 Logic Errors 349 PHP and Error Reporting 350 Handling Errors 351 Application and Installation Problems 352 Appendix D GD SDK Language Reference 358 Index 361 Team DDU 1 Annotation "PHP Game Programming" offers you the introduction you need to begin creating your own online games. You?ll be amazed at the games you can create with this powerful?and completely free?development tool! Dive right in as you begin with coverage of server configuration and the major features of PHP. Then you?re off and running as you use PHP to create and manipulate graphics, develop a chess game using a non-relational database, and send and receive data through sockets. Put your new skills to use as you create your own massively multiplayer online game! From the basics of PHP and HTML to the exciting task of creating dynamic terrain and Flash movies, "PHP Game Programming" will help you turn your online game ideas into reality! "PHP Game Programming" offers you the introduction you need to begin creating your own online games. You'll be amazed at the games you can create with this powerful - and completely free - development tool! Dive right in as you begin with coverage of server configuration and the major features of PHP. Then you're off and running as you use PHP to create and manipulate graphics, develop a chess game using a non-relational database, and send and receive data through sockets. Put your new skills to use as you create your own massively multiplayer online game! From the basics of PHP and HTML to the exciting task of creating dynamic terrain and Flash movies, "PHP Game Programming" will help you turn your online game ideas into reality!
دانلود کتاب PHP Game Programming