Real-World Flash Game Development: How to Follow Best Practices AND Keep Your Sanity

Real-World Flash Game Development: How to Follow Best Practices AND Keep Your Sanity

Christopher Griffith

Language: English

Pages: 432

ISBN: 0240817680

Format: PDF / Kindle (mobi) / ePub


Your deadline just got moved up. Your artist has never worked with Flash before. Your inner programmer is telling you that no OOP is a big Oops! Any Flash developer can share similar tales of woe. This book breaks down the process of Flash game development into simple, approachable steps. Never heard of a game loop before? No idea what a design pattern is? No problem! Chris Griffith gives you real-world expertise, and real-world code that you can use in your own games.  Griffith has been building games in Flash long enough to know what works and what doesn't. He shows you what you need to know to get the job done.

Griffith covers Flash for the everyday developer. The average Flash developer doesn't have luxurious timelines, employers who understand the value of reusability, or the help of an information architect to design a usable experience. This book helps bridge the gap for these coders who may be used to C++, Java, or C# and want to move over to Flash. Griffith covers real-world scenarios pulled from his own experiences developing games for over 10 years in the industry.

The 2nd edition will include: completely new game examples on more advanced topics like 3D; more robust physics and collision detection; and mobile device coverage with Android platform development for us on phones and tablets. Also coverage of the new features available in Flash CS5, Flash Player 10.1, and AIR 2.0 that can be used for game development.

The associated web site for the book: www.flashgamebook.com gets close to 1,000 visits a month. On the site, readers can find all the source code for the examples, news on industry happenings, updates and special offers, and a discussion forum to ask questions and share ideas.

The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP

Guide to Web Development with Java: Understanding Website Creation

Responsive Theming for Drupal: Making Your Site Look Good on Any Device

Responsive Theming for Drupal: Making Your Site Look Good on Any Device

Phishing Exposed

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

between private and public properties but rather prefixes them all with “m” as members of a class. There’s no real reason for public or private members to have different conventions because the compiler will catch illegal access of either kind—it’s not like you can really mess it up. Also, it has the added benefit of grouping all member variables in a class alphabetically when using code hinting. For instance, a player’s speed would be mSpeed rather than _speed, regardless of being public,

ClassesExample() { var blue:Square = new squareBlue(); addChild(blue); var green:Square = new squareGreen(); addChild(green); } } } You can use it like a normal class because when Flash compiles the SWF, it will be a normal class, just as though you’d written it yourself. Chapter 4 //COMMENTS FTW! getDefinitionByName and Casting Suppose you needed to instantiate a series of symbols or classes that followed a numeric sequence, say for the purposes of our example “square1” through “square10.”

Throwing Your Own Errors Sometimes, you may want to cause errors yourself to let you or another developer using your code to know that they’re attempting to perform an illegal operation. Creating an error is known as throwing to coincide with the catch metaphor. To throw an error, you simply use the throw statement, which is a core part of AS3. throw new Error("This is a custom error message."); You don’t actually have to specify a message for your error, particularly if you intend to create

MovieClip from playing. In fact, I have come up with a way to use this method to overcome a defect in ActionScript with regards to MovieClips and frame labels. Since early versions of Flash, you could put string labels on any frame in the timeline and use them as reference points for navigation. Starting from AS3, Adobe finally introduced the ability to see what label you’re currently on in a clip (with the currentLabel property), as well as a list of all the labels in a clip (the currentLabels

need much. External Image Tools The artists I work with typically use Adobe Photoshop and Adobe Fireworks raster game art. They produce very good JPEG compression and very clean PNG files. If you’re on a tight budget and can’t afford (or don’t need all the high-end features of) Photoshop, Fireworks by itself is a very satisfactory application. As of this writing, it is $300. For vector art, I’ve known a number of artists who use the tools in Flash to great effect, which cost nothing extra and

Download sample

Download