You are on page 1of 42

Editors Note

Dear Readers,
February issue comes out with a little retardation but I hope that you enjoy what is inside. In this issue you will find a reviews and very interesting interview with Jakub Dvorsky a Czech game developer and the founder of Amanita Design. From the interview made by Colin Cupp you will know what the biggest challenge early on Amanita Design for Jakub was and give some advises to game developers. If you want to create a 3D presentation in Flash Format you should read an article by Radu Ionescu who rewieved the DemoBuilder 8. If youre looking to outline those features that make your product-presentation stand out from the competition you should have a look on this article. There is also an article excerpted from Manning Publications. In this article from chapter 10 of Hello! Python, author Anthon Briggs talks about extending an application using the Twiste Framework to make it interactive over the Internet. Emanuele Feronato is a familiar name to anyone whos ever searched for something to do with Flash game development on Google. Richard Davey from photonstorm.com reviewed the book for us written by Emanuele Feronato: Flash Game Development by Example build 9 classic Flash games and learn game development along the way! With Marcelo Pires you will know how to use FlexMonkey to test your apps and how to make the aplication unit-tests. This month Marco will show you some tools which make your life easier as a developer. Read the article Developers Toolbox- Testing with FlexMonkey. This & much else youll find in the february Flash and Flex Developers Magazine. Enjoy! Enjoy your reading Adela Kuniarska and FFD Team

Editor: Adela Kuniarska adela.kuzniarska@software.com.pl Proofreaders: Garry Schafer, Michael Jovel,Alberto Jose Argon Alvarez, Nick Middleweek, Ranjan Rajendran, Ed Werzyn DTP Team: Ireneusz Pogroszewski ireneusz.pogroszewski@software.com.pl Art Director: Ireneusz Pogroszewski ireneusz.pogroszewski@software.com.pl Senior Consultant/Publisher: Pawe Marciniak Flex/ActionScript 101 Section Editor: Marc Pires marcpiresrj@gmail.com iPhone Development Section Editor: Ryan DAgostino Games Section Editor: Chris Hughes Contributing Editors: Pedro de La Rocque, Ali Raza, Csomk Gbor Publisher: Software Press Sp. z o.o. SK ul. Bokserska 1 02-682 Warszawa Poland Worldwide Publishing If you are interested in cooperating with us, please contact us by e-mail: cooperation@software.com.pl Whilst every effort has been made to ensure the high quality of the magazine, the editors make no warranty, express or implied, concerning the results of content usage.

All trade marks presented in the magazine were used only for informative purposes. All rights to trade marks presented in the magazine are reserved by the companies which own them. Thanks to the most active and helping beta testers: Russell TangChoon, Lee Graham, Jassa Amir Lang, Ed Werzyn, Yann SmithKielland, Justus, Csomk Gbor, Kevin Martin, Charles Wong, Ali Raza, Almog Koren, Izcoatl Armando Estanol Fuentes, Lionel Low, Michael J. Iriarte, Paula R. Mould, Rosarin Adulseranee, Sidney de Koning To create graphs and diagrams we used company. program by

Mathematical formulas created by Design Science MathType

Distributing current or past issues of this magazine without permission of the publisher is harmful activity and will result in judicial liability.

ATTENTION!

The techniques described in our articles may only be used in private, local networks. The editors hold no responsibility for misuse of the presented techniques or consequent data loss.

DISCLAIMER!

02/2012 (32)

CONTENTS
InBrief
8 Apache accepted Flex to its Incubator program
BY GABOR CSOMAK

Hello Python!
28 Writing a Simple Chat Server
BY ANTHONY BRIGGS

The holidays have brought a bushel of new games and apps, including the first version of those famously Angry Birds using Flash Player 11 and Stage3D. If youre all revved up and looking to build something new in the coming year, read Gabor Csomak advises!

Developers Toolbox
10 Testing with FlexMonkey
BY MARCO PIRES

In this article from chapter 10 of Hello! Python, author Anthony Briggs Talks about extending an application using the Twisted framework to make it interactive over the Internet. Lets start with the first part of our application, the protocol for our chat server. In Twisted terminology, a protocol refers to the part of your application that handles the low level details opening connections, receiving data, and closing connections when were finished. You can do this in Twisted by subclassing its existing networking classes.

This month Marco begins to present a set of tools that make your life easier as a developer, and show their benefits. As he involves the subsequent articles he will write about another tools and how to integrate them to have a better development workflow and your life easier. Read and learn how to use FlexMonkey to test your apps!

Interview
32 FGS 2012 Advisory Board Interview Series: Jakub Dvorsk
BY COLIN CUPP

Flash Develop Scripting


12 Open File By Text Selection
BY KRASIMIR TSONEV

FlashDevelop is one of the most preferred editors for the flash development. Krasimir Tsonev found it helpful for writing JavaScript, HTML, CSS and PHP code as well. I just took a big project with over 1000 php files and it is a little bit difficult to open the right file, even by using the Project panel.Krasimir Tsonev is a Hard-working, designer and developer offering excellent work ethic, enthusiasm and adaptability with experience in graphic design, frontend, backend and flash/flex development.

This is part three in a series of interviews of the Flash Gaming Summit 2012 Advisory Board. This is your chance to get to know the folks who determine the content of Flash Gaming Summit, getting their thoughts on both the conference and the games industry in general. This weeks Advisory Board interview features Jakub Dvorsk, founder of Amanita Design. In case you have been living under a rock, their game Machinarium has been a huge success on iTunes, specifically hitting #1 on the iPad. Machinarium was also a Mochis Award Show winner at FGS 2010 (Best Game Art category).

Review
36 Demo Builder 8 Create 3D Presentations in Flash Format
BY RADU IONESCU

Flash Game Dev Tip


18 Dealing With a Lack of Motivation to Finish Your Game
BY RICHARD DAVEY AND PHOTONSTORM.COM

Everyone suffers from this problem at one point or another: Yousimply cant face the thought of working on your game. This is especially hard when making the game in your free time. Its all too easy to think what the hell and double-click that Team Fortress icon instead of FlashDevelop. And even days when your head is saying lets code! all that motivation can vanish the moment you open the source and realise that its been so long since you were last here its like staring at a foreign language, or a giant brick wall and you have no idea what to start first.
02/2011 (32)

This article is for that who has software that you would like to showcase on your website. You would like to show potential customers how it functions and its key features. Simply put, you are looking to outline those features that make your produc stand out from the competition So how should you go abou doing this? Read and know how to create 3D presentations in Flash Format.

Book Review
38 Flash Game Development by Example
BY RICHARD DAVEY

IN BRIEF

Apache accepted Flex to its Incubator program

I am pleased to announce that Flex as been accepted into the Apache Incubator. The voting for a new logo is in progress. The Jira bug-tracker is up and running. The source code is in place. And the mailing list is full of messages. 36 committers and 4 mentors. Anybody can tell, that the community is excited, and 2012 will bring lots of success to Flex. If you are not already a committer, you can still help the work, or just look around at http://incubator.apache.org/flex/. source: The Official Flex Team Blog

revved up and looking to build something new in the coming year, see how you can publish a car visualizer to Flash in 90 seconds with Flare3D Studio Workflow. As we announced last year, we are investing in our Flash technologies to support the kind of innovative 3D and 2D games that developers and publishers want to deliver both in browsers and through mobile apps. To give developers access to high-performance C/C++ code, we told you were creating an improved,

Announcing Flex User Group 2012 Tour: North America Dates

Adobe is kicking off an international Flex User Group Tour to discuss recent announcements regarding Flex and the Flash Platform. These meetings will clarify any changes to Flex and Flash including updates on the runtimes and tooling. Additionally, the sessions will educate folks about the Apache process and what it takes for Flex SDK, as a project within the Apache Software Foundation, to continue to thrive. These meetings will be the best place to get accurate and upto-date information about anything related to Flex. Below are the cities and dates for our first wave of visits in North America. Europe and Asia dates will be posted shortly. Please refer to individual user group sites for detailed descriptions about the Flex sessions and speakers, including information on how to register to attend. Note: This information will be posted in the coming weeks and we will update this blog post with more detailed information as it becomes available. We hope to meet and talk with as many developers as possible so mark the dates and well see you there! North America 2/13/12 New York: New York Flex Meetup 2/15/12 Boston: Boston Flex User Group 2/21/12 Denver: Rocky Mountain Adobe Users Group 2/22/12 Seattle: Seattle Flash User Group 2/29/12 Chicago: Chicago Flex User Group 3/7/12 Los Angeles: LA Flex & LA Flash User Group 3/8/12 San Diego: San Diego Flash User Group 4/19/12 Dallas: Dallas Flex User Group source: The Official Flex Team Blog

paid, fully supported release of Alchemy for production development. This new addition will be available later this year and will allow developers to publish content leveraging Alchemy technology in Flash Player 11 or AIR 3 and beyond. Meanwhile, a few months ago we introduced full GPU-accelerated graphics rendering with Stage3D, which provides 1000x faster rendering performance over the previous versions of Flash Player and AIR on the desktop. Stage3D in Flash Player already enables fluid, hardware accelerated graphics for more people in more browsers than any other web technology. And were now seeing exciting previews of Stage3D hardware acceleration coming for mobile devices like iPhone, iPad, and Android smartphones and tablets. See for yourself whats happening with the latest updates to Flash Player and AIR for gaming, and jump in on the fun by checking out the beta release of Flash Player 11.2 and AIR 3.2! source: Adobe Flash Platform Blog

2012: The Year of Gaming

The holidays have brought a bushel of new games and apps, including the first version of those famously Angry Birds using Flash Player 11 and Stage3D. If youre all

News by Gbor Csomk (@csomak)

02/2012 (32)

DEVELOPERS TOOLBOX

Developers Toolbox
Testing with FlexMonkey
Hi, dudes, how are you doing ? This month ill begin to present a set of tools that make my life easier as a developer, and show their benefits. As I involve the subsequent articles Ill write about another tools and how to integrate them to have a better development workflow and your life easier. So lets get started.
What you will learn
Use FlexMonkey to test your apps application tests

What you should know


Minimal knowledge of testing Automate

uring the development of a big RIA as the one im involved with, its extremely important that not only developers have a set of tools to speed up development, but also all staff people. FlexMonkey is a tool that helps a lot, because it help Q&A staff define tests for an application with the advantage that they need to write any Actionscript code or deal with FlexUnit. See Figure 1.

Configuring a new project

After downloading and installing the tool, its time to create our first test suite. Fire up Flash/Flex Builder and create a simple project. Then open FlexMonkey and lets

Downloading and Installing

Installing is very straightforward. Access http:// www.gorillalogic.com/flexmonkey/download, register an account, login and download a version of the tool. I suggest that you download the latest version (version 5). See Figure 2. Installation is also super easy and self explanatory so ill not show the entire process here.

Figure 2. Creating an account

Figure 1. Main Window

Figure 3. Project properties window

10

02/2012 (32)

Testing with FlexMonkey

create our first test project. In the Project Configuration window fill the information about your project as Project directory, Suite Package name and so on as shown in Figure 3. Dont forget to choose the right SDK version. See Figure 3 and Figure 4.

Listing 1. Compiler arguments


-include-libraries ../libs/automation_monkey3.2.swc" ${flexlib}/libs/automation.swc" ${flexlib}/libs/ automation_agent.swc" ${flexlib}/libs/automation_dmv.swc"

Adding the automation Monkey

After filling all the details about your project, drag the icon shown below the SDK version to the libs directory of your project and then show you project properties from the project menu and add the compiler arguments

Figure 7. Recording interaction with application

provided to the Additional Compiler Arguments under the Flex Compiler category. See Listing 1 and Figure 5.

Putting the Monkey to work

Figure 4. Filling application details and test suite information

Now that we have all setup, compile and run the application, when your application loads in the browser, note that FlexMoney show the status CONNECTED. Now that FlexMonkey is connected to our app, just click the record button and play with the app a bit. Refer Figure 1. When in record mode you will se the command buffer, where FlexMonkey will display the commands as you interact with the application. When you finish the intended test, you can drag the commands to the corresponding test in testSuite. See Figure 6 and Figure 7.

Final statement

Figure 5. Compiler arguments

The FlexMonkey is very useful tool for automating tests as members with no programming experience can record the interaction with your application and then when its necessary to run the same tests again. It also generate FlexUnit tests making easy to integrate the tests with a build server. Next month we will see another tool that helps me a lot during my day. See you.

MARC PIRES
Marc Pires is a Developer located in Brazil, during his career, he has worked in various roles such as Network Administrator, Instructor. He has a strong passion for working with and researching new technologies. Specialized on RIA, Iphone Development, Restful web services and other interesting things, hes one of the main developers of the Esus System and is heads a startup specialized on mobile development. Contact information: @MarcPires (Twitter) | marcpiresrj@ gmail.com | IChat: marcpiresrj@aim.com

Figure 6. Command Buffer

02/2012 (32)

11

FLASH DEVELOP SCRIPTING

Flash Develop Scripting:


open file by text selection
FlashDevelop is one of the most preferred editors for the flash development. Ive been also using it last few years. I found it helpful for writing JavaScript, HTML, CSS and PHP code as well. I just took a big project with over 1000 php files and it is a little bit difficult to open the right file, even by using the Project panel.
What you will learn
Creating your own Macos

What you should know


If you want to create your own script I recommend to download the FlashDevelops code and explore PluginCores classes, properties and methods.

T
1

hats why I decided to invest time in solving this task and found that I can write my own C# script and run it. The site that I have to work on has a lot of files, but they are distributed in well named folders and basically the name of every class is a combination of folders path plus the name of the php file. So when I see something like:
$component = new basic_wrapper_component_manager();

select the name of the class and call a snippet which will open the file based on the texts selection. Then I realized that Ill need something more, because I have to parse the string. I checked the FlashDevelops site and found that I can write my own macros. They are powerful tool, but as far as I know it is not possible to manipulate the selected text as I wanted. At the end I managed to solve my problem by writing a script in C#
Listing 1. The C# Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 } using System;

I have to open the file /basic/wrapper/component/ manager.php. Firstly I was thinking that I will be able to solve the problem by using snippets. My idea was to

using System.Windows.Forms; using PluginCore;

public class FDScript

private static string file;

private static string projectPath; public static void Execute() {

MessageBox.Show("Script here");

Figure 1. Macros panel

12

02/2012 (32)

FLASH DEVELOP SCRIPTING

Listing 2. Basing script code


1 2 3 4 5 6 7
private static string file;

private static string projectPath; public static void Execute() {

file = PluginBase.MainForm.CurrentDocument.SciControl.SelText;

projectPath = Path.GetDirectoryName(PluginBase.CurrentProject.ProjectPath);

Listing 3. Example of the actual script


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 } } using System; using System.Windows.Forms; using System.Text; using System.Text.RegularExpressions; using ScintillaNet; using PluginCore; using System.IO;

38 39 40 41 42 43 44 45

if(file.IndexOf(delimeter) >= 0) {

string[] pathParts = file.Split(new int numOfParts = pathParts.Length;


if(numOfParts > 1) { for (int i=0; i<numOfParts-1; i++)

Char [] {delimeter});

using PluginCore.Helpers; using System.Drawing;


public class FDScript

pathParts[i] + "\\"; }

projectPathAddition +=

delimeter + "'", "Found delimeter

if(InputBox("Found delimeter '" +

'" + delimeter + "'. Search for '"

private static string file;

+ pathParts[numOfParts-1] + "' in: "No") == DialogResult.OK) { projectPathAddition; } projectPath += "\\" +

private static string projectPath; public static void Execute() {

", ref projectPathAddition, "Yes", 46 47 48 49 50 51 52 53 54 55 } } }

file = PluginBase.MainForm.CurrentDocument. projectPath = Path.GetDirectoryName(Plugin Base.CurrentProject.ProjectPath); SciControl.SelText;

file = pathParts[numOfParts-1];

public static bool findFile(string dir, string

InputBox("File name", "Type a file

name:", ref file, "Ok", "Cancel");

bool result = false;


try {

file) {

if(file != "") {

foreach (string f in ".?*")) {

char[] delimiterChars = {'_', '/'}; searchForDelimeters(c); /

Directory.GetFiles(dir, file + PluginCore.PluginBase.MainForm.Ope result = true;

foreach( char c in delimiterChars) { }

56 57 58 59 60 61 62 63 64 65 66 }

nEditableDocument(f, true); }

// alert(projectPath + "

" + file);

if(!findFile(projectPath, file)) {

found.");

alert("File (" + file + ") not

foreach (string d in Directory.GetDire ctories(dir)) {


if(findFile(d, file)) {

result = true;

public static void searchForDelimeters(char

string projectPathAddition = "";

delimeter){

} catch (System.Exception excpt) { } alert(excpt.Message);

14

02/2012 (32)

FLASH DEVELOP SCRIPTING

that is called by macros. Here are all the steps that I went through:

Step 2 creating a basic script code

Step 1 creating the macros

Open the macros panel by pressing [Ctrl + F10]. The panel looks like on the Figure 1. Click Add button and enter the name of your macros in the Label field. Also set a Shortcut so you can call it fast while you are coding. The real part of the macros has to be written in Entries filed. Because you have to run an external script you have to use the following command:
? 1

The script file has to contain C# code and it has a basic structure like this: Listing 1. Dont worry if you are not familiar with C#. You can still code with a little help from Google. Every script has to contain Execute method which is actually the starting point. I strongly recommend to check this thread in the FlashDevelops community forum. I followed the instructions there and downloadedSnippet Compiler which is actually pretty good simple C# editor. It also offers code completion and if you add PluginCore.dll you will have completion of the FlashDevelops things.

Step 3 creating the actual script


ExecuteScript|Development;path/to/your/file.cs

My command looks like that:


? 1

Firstly we should get the current selected text and the current projects directory: Listing 2. When we have this data we can parse the file variable, find the path, the name of the file and open it:
1 PluginCore.PluginBase.MainForm.OpenEditableDocument (path/file, true);

TSONEV//CODING//FLASHDEVELOP//Macros//C#//OpenFile.cs

ExecuteScript|Development;D://WORK//PROJECTS//KRASIMIR

Listing 3. Full code of a script


67 68 69 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
return result;

95 96 97 98 99

buttonOk.Anchor = AnchorStyles.Bottom | buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; AnchorStyles.Right;

public static void alert(string mess) {

MessageBox.Show(mess);

Form form = new Form();

form.ClientSize = new Size(396, 107); form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel });

Label label = new Label();

TextBox textBox = new TextBox(); Button buttonOk = new Button(); Button buttonCancel = new Button(); form.Text = title;

100

form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height); xedDialog;

label.Text = promptText; textBox.Text = value;

101 102 103 104 105 106 107 108 109 110 111 112 113 } }

form.FormBorderStyle = FormBorderStyle.Fi form.StartPosition = FormStartPosition.Ce form.MinimizeBox = false; form.MaximizeBox = false; form.AcceptButton = buttonOk; nterScreen;

buttonOk.Text = labelOk;

buttonCancel.Text = labelCancel; buttonCancel.DialogResult =

buttonOk.DialogResult = DialogResult.OK; DialogResult.Cancel;

form.CancelButton = buttonCancel; DialogResult dialogResult = value = textBox.Text;


return dialogResult;

label.SetBounds(9, 20, 372, 13);

textBox.SetBounds(12, 36, 372, 20);

form.ShowDialog();

buttonOk.SetBounds(228, 72, 75, 23);

buttonCancel.SetBounds(309, 72, 75, 23); label.AutoSize = true;

textBox.Anchor = textBox.Anchor | AnchorStyles.Right;

16

02/2012 (32)

FlashDevelop scripting: open file by text selection

Figure 2. Simple input

When you run the script it checks if there is any text selection. If not then open a simple input where you can write in (Figure 2). After that the data is processed and split by using _ and / (searchForDelimeters method). I.e. the script is trying to guess the files path. Of course you can skip this by clicking the No button (Figure 3). findFile method is used to parse all the projects directories and search for the files based on the files name. If you want to create your own script I recommend to download the FlashDevelops code and explore PluginCores classes, properties and methods.

KRASIMIR TSONEV
Figure 3. search for the les based on the les name

The main purpose of this script was to use it in this project, but actually I found that I can use it in any other project. I decided to extend it and add additional features. Here is the full code of the script and you can download it from here (Listing 3).

web designer and developer Hard-working, designer and developer offering excellent work ethic, enthusiasm and adaptability with experience in graphic design, frontend, backend and ash/ex development. Personable, friendly and eager to work and learn with others. I enjoy working in the industry and have a passion for creating and discovering new and effective digital experiences. To see examples of my work please visit my portfolio website at http://krasimirtsonev.com. References are available on request.

Design, Technology and Cool Shit @ FITC Amsterdam 2012


FITC Amsterdam 2012 is host to more, better and different topics in design, technology and cool shit than ever before! Covering HTML5, Kinect hacking, jQuery, Unity, plus over 50 other topics, FITC Amsterdam delivers. Featuring the best and brightest in the digital space including Hoogerbrugge, Lee Brimelow, Golan Levin, Grant Skinner, Andreas Mller and many more, FITC Amsterdam showcases work which is shaping the future of the digital interactive industry. The combination of unbelievable international presenters, incredible networking opportunities and the infamous FITC parties, all with the amazing backdrop of the city of Amsterdam, creates a stage for the unexpected. FITC Amsterdam has a history of selling out and 2012 is on track to as well, so register early to reserve your spot! For more information visit www.fitc.ca/amsterdam

02/2012 (32)

17

FLASH GAME DEV TIP

Flash Game Dev Tip

Dealing with a lack of motivation to finish your game You are not alone
Everyone suffers from this problem at one point or another: You simply cant face the thought of working on your game. This is especially hard when making the game in your free time.

What you will learn


How to remind yourself about coding.

What you should know


How to create your own game

ts all too easy to think what the hell and double-click that Team Fortress icon instead of FlashDevelop. And even days when your head is saying lets code! all that motivation can vanish the moment you open the source and realise that its been so long since you were last here its like staring at a foreign language, or a giant brick wall and you have no idea what to start first. There is no single solution to fix this. Its extremely personal. Your reasons for not wanting, or being able to code will be as varied as the number of people reading this. But as I said at the start you are not alone so I posed the question of how to deal with it to 13 fellow game developers and collated their replies. Hopefully somewhere in these insights youll find a technique or suggestion that helps you out. And if you have one that you personally use, not already mentioned, please post it into the comments. Ill kick things off

Richard Davey / Photon Storm

http://www.photonstorm.com Ive come to realise that Ive a game development mana reserve. When I start work on a game, my mana reserve is full. But as coding begins this reserve drops faster and faster. Sometimes if I hit a particularly troublesome spot in a game it can be enough to utterly wipe-out what reserves I had left, derailing the project entirely. But there are also the wins. Getting

a significant part of the game finished, or adding something really cool. That helps re-fill my mana reserves and keeps motivation high. Its a constant battle. To get the game finished before enthusiasm is depleted entirely, yet to have enough wins on-route that they keep things in balance. The wins however cannot be artificially placed into the project. They have to be unexpected and grow almost organically as a result of working on the game. Equally the hits to my morale are never expected either. I never start coding expecting to stump my toe on a bug from hell, but it happens. There are two issues here:

18

02/2012 (32)

FLASH GAME DEV TIP

1) Having the motivation to continue working on a game

I think like a lot of people Im most excited about a game during the very early stages of it. The feeling of bringing something to life, of getting the idea out of your head and into code thats a real achievement in and of itself. I enjoy the task of getting a working prototype up and running, often with really crappy code driving it. The thing to do at this stage is to try and work out for yourself if you should stop right now, and not even attempt to carry on. Use those prototypes There is nothing wrong in building a prototype and just leaving it at that. Of course if youre in this for the money its not going to get you rich, but if like me you do this for fun then you shouldnt feel any sense of guilt for having made just a prototype. If by this point you recognise that your enthusiasm is on the wane already then dont just file it away for another day, thinking youll come back to finish it later on. Because almost certainly it will never happen. If you dont have the enthusiasm or excitement at the end of this stage to take the game further, then you never will. Dont waste it though. Think about how what youve made could be useful to others. Perhaps itd serve as an interesting I made this little demo post for your blog or a forum. Or maybe it could be turned into a tutorial for a development site with little modification. You may be surprised at the response. Ive had people see demos of work who suggested just one change, that radically altered the course of the game, resulting in it being finished and released. As I mentioned at the start, mana refills can come from anywhere, sometimes the most unexpected of places. Do something other than making games Making complete games is hard, theres no doubting this. Even the most simple of games still require quite

tedious boot strapping to make them suitable for release. But that rush and feeling of sheer joy you get when you finally publish doesnt always have to come from making a game. As readers of my blog will know I work on a lot of game development projects such as my Flixel Power Tools or tutorials. I do this because I enjoy writing, but also because I remember what it was like being fresh to development how I was a sponge, soaking up every last piece of information I could get my hands on. There is a real thrill in authoring this type of content too, and publishing it. So you dont feel like making a whole game? No problem could you make a demo that showcased how to make a sprite jump from platform to platform? The scale is significantly smaller, but the end result could be extremely useful to your fellow developers. And their feedback can be enough to spur you on during the more laborious development work you need to do. Of course the downside of all this writing is that it takes your time away from making actual games, as Ilija will attest to. Public Beta Tests We ran a public beta test of a game called Kingdums. We just put a build of the game onto a web page with a big feedback form below it, and shouted the URL onto twitter. It was live for a week. The feedback we got was fantastic, because it under-lined a significant flaw in the game (that was in the back of our minds anyway, but made it prominent) and reaffirmed that actually, this flaw aside, people really enjoyed playing it. Other developers use public beta tests for similar reasons lots do it to find out if their games have bugs theyve missed, but it doesnt just have to be about that. Sometimes youll get suggestions that highlight issues you didnt see, and sometimes its just a good morale boost. Its not just code that can be tested you could postup screen shots, character bios, even basic story arcs. All things that feed back into the game overall. Enforced Time Constraints Some people dont understand the point of making a game in a limited period of time. Others relish the challenge. Personally I fall somewhere in the middle. I havent yet had a chance to take part in something like Ludum Dare, because I have a family life that stops things like that happening over weekends. But the times that I have made a game in a limited period of time (weve done it 3 times now) it has always worked for the better. Todo lists get cut down dramatically. Only the essential game aspects are given attention, and the time limitation really does focus your mind. Try it, it may appeal to you.

20

02/2012 (32)

FlashDevelop scripting: open file by text selection

Using a To-Do List Youll see this suggestion raised time and again by the other devs below. Ilija and I use the free softwareWunderlist. I like the fact I can add items from my iPhone or PC and have it all sync-up properly. We dont have lists for prototypes, only for games deep in development. I find it pointless starting a list with make an enemy manager, that feels too early-on in the process for us.

2) Dealing with getting stuck while coding

This is the easiest to solve. If you have a coding problem, then you ask for help. If you dont work in an environment where you can ask fellow coders for suggestions, then there are hundreds of really great game dev communities online. And you should join one and really participate with it. Help out other people suffering problems you may already solved, and post your problems up there also. More often than not someone will help, or at least direct you onto the right path that leads to solving the problem anyway. If you cant solve the issue within a couple hours of trying, and cant think of another way to approach it, then you need a bring a second brain into the equation. The longer you delay in asking for help, the more chance you have of never finishing.

Dont feel guilty

Youre only human. Humans need a fine balance between work, rest and play. And developers are terrible at balancing those three elements. Theres a famous producer graph showing Price Speed Quality, with the mantra that you can only ever have

2 of those 3 things. So Speed + Quality comes at the expensive of Price, or Low Price + Speed means low Quality. I feel that developers do the same with Coding Resting Playing. By Playing I mean taking time out from coding: watching a movie, spending time with your significant other, reading a book, playing Xbox, etc. Too much coding but the right amount of sleep usually means you give-up your play time. If youre burning the candle at both ends, holding down an intensive day job and then coding all night, your Rest and Play can be sacrificed. If when you sit at your computer you find the code just isnt flowing then stop. Dont battle it, dont trudge through. Just stop and do something else entirely (ideally non-computer based). Then try again the next day. If youve been working like mad all week, getting a few hours sleep a night, then pay off that sleep debt. Development is a roller-coaster of highs and lows. If you recognise youre on a coding streak then enjoy it and use it to your advantage, but when it ends (and it will end) switch track quickly and work on something else. Then switch back again. The quicker you learn to recognise your moods the more useful you can make them. Im not perfect at this yet, not by a long shot. I still have lots of unfinished games, indeed the artwork I used to illustrate my text above is all taken from games Ive not yet finished, and there are plenty more. But I never sit idle. I do at least work and release. If Im not making a game, Ill write, and if Im not writing Ill help out in a forum. If Im not in there maybe Ill be playing a little Counter Strike. The point is that I feel I do balance them well, one doesnt over-power the other. I just wish I had more hours in the day. Thats me done with, now onto 13 other developers for their views on this subject

John Cotterell

I make a point of working on something every day, even if only for a few minutes, that way Im always making some kind of progress, and it keeps you in the habit of doing something so that when you are motivated you get a shitload done. When Ive lost motivation on commercial work I break work down into studpily small steps import assets, add method to class, email project manager, etc. That keeps the momentum going and keeps the big picture hidden away from view, which is sometimes what you want.

02/2012 (32)

21

FLASH GAME DEV TIP

Flow is a subject every game developer should familiarise themselves with it has so much relevance to us as its crucial to great game design, as well as it

Working in a (small) team. When my mate does all the graphics, I cant bring myself to saying I dont feel like going on any more. Dont start several projects at once. Its like a treat for myself; Once I finish this game, I can go on and pick a new one!

Sudden drops in motivation might be solved by: Doing an (even worse) chore in the house, snacking, going out for a walk / shopping, posting to a friendly forum.

Olli / Gaming Your Way

is for getting the job done. http://en.wikipedia.org/wiki/ Flow_(psychology) I rarely find myself in that state as a developer, but I do occasionally have good days, and time really does fly by when youre in that state of mind.

Bas / Bits of Bas

http://www.bitsofbas.com/ Im on several customer monster projects and Im dragging myself from deadline to deadline since the beginning of February, working from 07:00 to 21:00 on weekdays. Weekends maybe 9:00 to 15:00. As you can imagine my motivation is in pretty bad shape and I dont even remember what it was that made me think it was a good idea taking on this huge amount of projects. The three things that keep me sane: My to-do list. Stop myself from thinking and just go do the frigging next point on the list. Knowing there will be a nice amount of sure money (instead of sponsor maybe money) waiting for me at the end of the ride that will allow me to take a long summer holiday and pave the road to starting my own projects again. Surely when looking back after a couple of months, I will be proud of my creations. Looking at the bright side always helps.

http://www.gamingyourway.com I usually dont have to motivate myself there, although, our current in-house project is dragging for 9 month now. It got WAY bigger than first imagined (way better too) The thing that keeps me going on that one: the todo list (producteev.com and astrid/android) AND the knowledge that itll be done more or less soon. On personal projects its a different matter Im working on two things right now: crystalis and the quite complex hellstrom. On both games its the todo list (see above) and the fact that I enjoy working with c#/Unity/3d. The one thing that distracts me is my wife, though. Otherwise Id be working more on the games. She constantly tells me that if I feel that I need to work on my games more I can do it but as girls are there is a certain but you better dont attached to it. Luckily shes the manager of a venue and does at least one night shift per week.

Editors Note

Olli touches on a real issue here that of family life getting in the way and the real feeling of guilt that devs endure when they are desperate to escape and just geek-out for a while. Theres no denying that we love our families, and enjoy spending time with our wives and children. But for most geeks I know there is a real need to get away from it all, even for a short period of time, and create or do something constructive on their computer. This is worthy of a whole article in itself.

Julian / LongAnimals

http://www.longanimalsgames.com Think of the money, and how crap your old age will be if you dont save up. Dont take too long over a project.

As for my own projects, all these help: Choosing a game-play you REALLY like. That keeps me entertained. Go for SMALL games if you know your motivation is a liability. A decent GDD or to-do list. Moving from point to point. Keep yourself in line.

Iain Lobb

http://www.iainlobb.com/ If youre not feeling the project, the best thing to do is just break it down into micro-tasks and tick them off one by one. At this level its pretty brainless so Ill sometimes stick on a DVD or podcast while I work on client stuff. For

22

02/2012 (32)

FLASH GAME DEV TIP

personal / indie projects, the best thing for me seems to be to have a very small scope at the start. Scope will obviously grow/creep as the project develops, but at least by starting small you arent setting yourself up for failure. The other really important thing for all projects is to have the artwork first. This gives me a much better vision of the finished product and keeps me motivated to keep working. If youre developing with grey boxes it can make it seem like finishing is impossible.

and it removes the chance of it becoming vapourware as you really dont want to look bad after giving it large. For me working on only one project at a time helps so much. It brings focus to it, and it stops a cross pollination of ideas between projects which always leads to feature creep (Ive just added something sweet to game A, hang on, that could work in game B if I just alter). The hidden bonus to this is that during the vinegar strokes of a project youve got a brand new one to look forward to, rather than having more slog / donkey work on another one (You forget about all that at the start of a project, if you didnt you wouldnt make games. Its like forgetting just how painful child birth is). For client games its slightly different, there for me its about making the client love our work so much that they slide off their chair after a cum explosion. Its not for the re-hire, thats never really appealed, thats like going to the same prostitute twice, its about making the client feel good about themselves for picking the right team, that weve hit the project and hit it hard. This is how we fucking roll client bitches, this is what you get when you go gyw. That and obviously the silly money.

Editors Note

Squize / Gaming Your Way

Pure Shakespeare Squize, pure Shakespeare.

http://www.gamingyourway.com Picking a game Im panting to play. Very rarely Ive pandered to what I thought the market would want, and those games have become such a slog because theyre not always a game Im really into. If Im writing a game for myself, which is what personal projects should be, then its because I really want to play that game. Split the boring stuff up. Theres always some parts of every project which are just donkey work no matter how fun working on the overall game is. If I know Im going to spend a day doing something which makes me die a little inside, I budget the next day to do something fun, usually eye-candy related (This why I often hear Youve put particles in there? But, but the game doesnt work). Personal pride. This may seem a little trite, but its very valid. Weve worked so fucking hard to ensure that our games are of a certain standard, that were perceived a certain way, that we try and maintain those levels even if it means re-doing things to match our own expectations and no one elses. Were our own worse critics, and this is why weve only done one Game in a day as we just cant add the levels of love we want in that time scale (Obviously there is always a compromise, but if your expectations are high you compromise less). Getting others on board. If you want to give up smoking, or lose some weight, you tell people so you cant back out without looking like a dick. The same applies with games, show people stuff early and often

Ali / Alillm.com

http://www.alillm.com I actually find that when I get bored of a project and want to start something else, its best to just give in and start the new project. If I dont, I will constantly have it on my mind and I wont get anywhere with the original project anyway. After a few days of working on the new project, my enthusiasm for it will have worn off a bit and its much easier to convince myself that finishing the original project is the best use of my time. A positive side effect is that once Ive finished the original project, I already have a good foundation for my next game waiting for me so I dont have to start with a blank canvas. Also, to-do lists are of course a big help, especially in the final stages where its just a case of adding all of the boring bits.

24

02/2012 (32)

FlashDevelop scripting: open file by text selection

Chris Houston / Utinni Games

http://www.utinnigames.com I find a useful thing with todo lists is at the end of the day you can look down and go great, Ive done those bits and tick them off. You get to see what progress youve made, where often if youre head-down in a big project it it starts to feel like its not going anywhere. These days I usually have two lists, a headlines list and a bugs list. The headlines are the Add Baddies kinda things, while the bugs are the little nasties that crop up along the way. When the bugs list gets longer than the headlines, I do them all before going back to the nice bits. Something else Ive realised recently is that all project have their ups and downs. The fun bits and the boring bits, the parts that motivate you to work till the early morning, and the bits where you cant be arsed to even look at it. But giving up or abandoning projects at the low parts mean you dont get to the next good bit.

It takes a lot of effort to get moving, but when it does its unstoppable. The trick for me is to muster enough willpower to force myself to do the hard slog bit at the start. I just have to force myself to get on with it. Sometimes Ill need to clear down other stuff first, or itll keep knocking me out of the zone. Get those important emails sent. Make up those invoices. Do the washing up. Watch the latest episode of Mythbusters and complete that latest game. Then be ruthless. Then get on with it. No excuses. No breaks. Open Flash and do at least an hour of gazing at code or tweaking level designs or something. Doesnt really matter what in terms of getting momentum going, so pick something easy and fun. Once youve got brain-momentum going, the rest just falls into place automatically.

Dave Munsie / Munsie Games

Chris Underwood / Deeperbeige

http://munsiegames.com I used to have severe motivation (a.d.d?) problems. Like most people I learned to take things in much

http://deeperbeige.com Motivation on contract stuff is pretty much never a problem for me. I can turn down projects I dont like the sound of much, so Im likely to be at least a bit interested in it. Theres a pot of cash waiting at the end, and people checking up on your progress all the time. That sounds cold and cynical, but its not. Im motivated to give my clients the best value I can for their dosh, and I never want to build bad games (although sometimes I do and why is another lengthy subject). Private games are a different matter. With no externally enforced deadline, nobody harassing you to get it done, and with the latest blockbuster games installed on the work machine too, its all too easy to wander. The best defence Ive found is brain-momentum. If you can get in that state of flow where you do pure work and dont even notice the time go by, youre on a winner. The hard part is getting there, but all you have to do is try hard a lot. Its like getting a big heavy boulder rolling.

smaller steps. Otherwise I really dont have any motivation problems, because if I dont work I dont make money.

Tony / Tonypa

http://www.tonypa.pri.ee I dont do contract work so it only leaves the games I make because making games is fun. Since there is no money involved, only fun-part, I stop the project as soon it is not fun anymore. Which happens a lot. Over the years I would say I only finish 1 out of 10 games. I dont even enjoy coding too much. Most fun is to imagine how something could work, usually at halfsleep. Sitting down and writing the code for it to work is interesting only as far it improves or changes the first idea. Something went wrong in the code but it creates new and interesting gameplay scrap the original idea and go for this instead. For me making games is a lot

02/2012 (32)

25

FLASH GAME DEV TIP

like painting or writing novel, its a creative process where you have some vague idea about what you would like to create but process itself is the main reason to do it. One thing I have noticed is to never start on graphics too early. If the game is not fun using only boxes and circles then it will not be fun with robots-zombievampires either. So I tend to stick with boxes and circles

for a very long time, sometimes getting used to those so much that I never bother putting proper graphics into game.

something and it wouldnt matter if it was good or bad. The point was to remember why I love doing it in the first place. We all sort of chose to do what we like to do, and when you forget that, you have to shed the things that make it not fun anymore and start over. Another trick is to deliberately do things slowly. It helps separate the process from the goal, which in turn helps me to not be impatient and wish Ive already completed something. I also employ this tactic when I have to wash the dishes or similar. I just start doing it and after a while its magically done. All in all this would boil down to making time stop for lack of a better description. I find that going to the office every day and clicking on thousands of links people send me each day makes me lose the grip on my time, and then I try to just stop and sort of be in the moment, in the now. Its like theres a big noisy machine out there and you cant hear your own thoughts because of all the noise it makes. I do suffer from being used to doing what Im passionate about. I think this is very important in life and I dont want to regret not doing it later. The drawback is that I start a zillion things and take on a zillion projects and thus lose focus and disintegrate. When I get passionate about the next thing, the thing Im working on is of course not finished yet and so I just leave it there. Ultimately the right thing to do.

Rob James / robotJAM

http://www.robotjam.com I think it really helps on projects working fulltime with another person, me and the other guys generally spend most of the time kicking each other into getting stuff done, and on non contract jobs theres the added motivation the faster you get it done the more profitable it is. I always find I hate the first few days of a project, but I know that after that well have a decent prototype done and the middle part of the project is always the best. Its the end which I really hate as you think its done and it always takes a while to finally kill them off. We generally move onto lists in the last week of a project and just knock them off one at a time.

Ilija Melentijevic / Photon Storm

http://ilkke.blogspot.com I use lots of methods to tackle lots of related problems, so Ill just spill it all, and you try and make sense of it. A long time ago I too had trouble with starting things. Typical procrastination stuff, you do nothing for so long and then you feel like you have to do something epic to make up for it, and that only makes it harder, etc. For me the trick was to just start doing anything. Not do it for the sake of completing it but for the sake of enjoying the process. I would just take a pen and draw

There are however times when Im not in love with any project in particular and this is the time I use for making progress on the things that Ive left hanging. I make lists, I put files and folders out on the desktop to

26

02/2012 (32)

FlashDevelop scripting: open file by text selection

remind me of their existence. It also helps to to a tiny bit of work done whenever you have a little bit of time. These fragments add up very quickly. Sometimes I just think about the amount of work I do when Im being paid for it (full time or freelance), and think about how I should be able to work for myself even better. I tell myself its humiliating to not be able to get myself to do things that I feel are the only ones really worth doing. Also, heres something a friend once told me: In a few years time, nobody will know how easy or hard it was for you, if you were tired, or ill or if somebody close to you had passed away. All that is left is what youve done. The trick for me is to have mantras such as these, thoughts that snap me out of the everyday slipstream and remind me how each day is special, how I am special (since we are all different, thus special) and that I should be doing things that only I can do instead of wasting time on the net or in front of the TV, or *shudder* watching series. Or playing games that are not the absolute best games Ive ever played. Of course, one has to unwind now and then, but we usually end up being too lax on ourselves instead the other way around. Let me try to wrap up this chaotic rant with something practical: I find it helps to keep track of what Ive already
a d v e r t i

done, it makes me feel powerful and thus less prone to procrastination. Even a very simple method like Pomodoro Technique does wonders.

RICHARD DAVEY AND PHOTONSTORM.COM


Photon Storm are Richard Davey and Ilija Melentijevic. This is our place on the web where we publish our HTML5 and Flash games, artwork and tutorials. We like writing about all facets of game development and sharing cool links now and again. For my day job Im the Technical Director of Aardman Digital, the online department within Aardman Animations most famously known for Wallace and Gromit, Shaun the Sheep and Creature Comforts. Part of the work our department does is to create games and online experiences based around our key brands. Prior to joining Aardman I spent years working in the games industry for a ne company called The Game Creators. They produce software that allows anyone to create decent games on the PC with relative ease. Im still in close contact with the guys there and will be blogging about anything exciting I see on their horizon. I consider myself a hardcore gamer, and have always loved gaming since I saw my rst ever Atari 2600. Im also an Atari otaku. The Atari ST holding a special place in my heart, which is why I built this site dedicated to it. So if my code experiments have a seriously retro avour to them, that is why! s e m e n t

02/2012 (32)

27

HELLO PYTHON!

Hello! Python
Excerpted from
Hello! Python By Anthony Briggs In this article from chapter 10 of Hello! Python, author Anthony Briggs Talks about extending an application using the Twisted framework to make it interactive over the Internet. You may also be interested in

For source code, sample chapters, the Online Author Forum, and other resources, go to http://www.manning.com/briggs/

Writing a Simple Chat Server


Well use a framework called Twisted, which contains libraries for working with many different networking protocols and servers.

ell build a simple chat server so we can log in and play a game with other people via the Internet. Normally these games are referred to as MUDs, which stands for multiuser dungeons. Depending on the person creating them, MUDs can range from fantasy hackand-slash to science fiction, and players can compete or cooperate to earn treasure, points or fame.

Getting started

The first step is to install Twisted and get a test application running. Twisted comes with installers for

Figure 1. Installing Twisted on Windows

28

02/2012 (32)

Hello! Python

Windows (Figure 1) and Macintosh, which are available from the Twisted homepage at http://twistedmatrix.com. If youre using Linux, there should be packages available through your package manager. The installer will pop up a window as it compiles things but, once you see the window on the right in Figure 1, Twisted is installed! The only other thing that you need is a telnet application. Most operating systems come with one built in, and there are many free ones that you can download. I normally use PuTTY, which is available for Windows.

receiving data, and closing connections when were finished. You can do this in Twisted by subclassing its existing networking classes (Listing 1).

#1 ChatProtocol is like Telnet


For
StatefulTelnetProtocol.

server, well be using Twisteds It takes care of the low-level line parsing code, which means that we can write our code at the level of individual lines and not have to worry about whether we have a complete line or not.

our

chat

#2 Override connectionMade

Our application

Well now write our simple chat server. Its a little more complex than Hello World, but we can extend this program and use it for gaming. Open a new file and save it as something like chat_server.py. Lets start with the first part of our application, the protocol for our chat server. In Twisted terminology, a protocol refers to the part of your application that handles the low level details opening connections,
Listing 1. A simple chat server protocol
from twisted.conch.telnet import StatefulTelnetProtocol
class ChatProtocol(StatefulTelnetProtocol):

Were customizing our protocol by overriding the built-in connectionMade method. This will get called by Twisted for each connection the first time that its made.

#3 A new connection

Were just taking care of a bit of housekeeping here storing the clients IP address and informing everyone whos already connected of the new connection. We also store the new connection so that we can send it broadcast messages in the future.

#1 #1 #3 #3 #3 #3

def connectionMade(self):

self.ip = self.transport.getPeer().host print "New connection from", self.ip self.msg_all(

#2

"New connection from %s" % self.ip, sender=None)

#3 #3

self.factory.clients.append(self) def lineReceived(self, line):

line = line.replace(\r, ) (line, self.ip))

#4 #4 #4 #5 #5 #5 #6

print ("Received line: %s from %s" % self.msg_all(line, sender=self) def connectionLost(self, reason):

#4

print "Lost connection to", self.ip self.factory.clients.remove(self)

def msg_all(self, message, sender): self.factory.sendToAll( message, sender=sender)

#6 #6 #6 #6

def msg_me(self, message): self.sendLine(message)

message = message.rstrip() + \r

#6

02/2012 (32)

29

HELLO PYTHON!

#5 Close the connection

If the connection is lost for some reason either the client disconnects or is disconnected by us, connectionLost will be called so that we can tidy things up. In our case, we dont really need to do much, just remove the client from our list of connections so that we dont send them any more messages. To make our code easier to follow, Ive created the msg_all and msg_me methods, which will send out a message to everyone and just us, respectively. msg_all takes a sender attribute, which we can use to let people know who the message is coming from. So that takes care of how we want our program to behave how do we link it in to Twisted? We use what Twisted refers to as a Factory, which is responsible for handling connections and creating new instances of ChatProtocol for each one. You can think of it as a switchboard operator as people connect to your server, the Factory creates new Protocols and links them together something like Figure 2. So how do we do this in Twisted? Easy. See Listing 2.

#6 Convenience methods

Figure 2. A factory creating protocols

#4 Handle data

The Telnet protocol class provides the lineReceived method, which gets called whenever a complete line is ready for us to use (whenever the person at the other end hits the return key). In our chat server, all we need to do is send whatevers been typed to everyone else whos connected to the server. The only tricky thing that we need to do is to remove any line feeds; otherwise, our lines will overwrite each other when we print them.
Listing 2. Connecting up our protocol
from twisted.internet.protocol import ServerFactory from twisted.internet import reactor
class ChatFactory(ServerFactory):

#1 A ChatFactory?
#1 #3 #1 #1

...

protocol = ChatProtocol def __init__(self):

A Factory is object-oriented terminology for something that creates instances of another class. In this case, itll create instances of ChatProtocol.

#2 Talking to everyone

self.clients = []

#2 #2 #2 #2 #2

def sendToAll(self, message, sender): message = message.rstrip() + \r


for client in self.clients: if sender:

client.sendLine(

#2

else:

sender.ip + ": " + message)

#2 #2

client.sendLine(message)

#2

The ChatFactory is the natural place to store the data shared between all of the ChatProtocol instances. The sendToAll method is responsible for sending a message to each of the clients specified within the clients list. As you saw in Listing 1, the client protocols are responsible for updating this list whenever they connect or disconnect.

print "Chat server running!" reactor.listenTCP(4242, factory) reactor.run()

#3 #3

#3 Wiring everything together

#3

The final step is to let Twisted know about our new protocol and factory. We do this by creating an instance of ChatFactory, binding it to a particular port with the listenTCP method

30

02/2012 (32)

Hello! Python

It may not seem like much, but weve already got the basic functionality of our MUD server going. Now were ready to start connecting a game to the network.

Summary

We learned how to set up a chat server so we can log on and interact with other game players on the Internet. We first set up the protocol for our chat server and then we linked it to Twisted, which contains libraries for working with many different networking protocols and servers.
Figure 3. Our chat server is running

and then starting Twisted with a call to its main loop, reactor.run(). Ive chosen 4242 as the port to listen to. It doesnt matter too much which one you use, as long as its something above 1024 so that it doesnt interfere with the existing network applications. If you save that program and run it, you should see the message Chat server running! If you connect to your computer via telnet on port 4242 (usually by typing telnet localhost 4242), you should see something like Figure 3.
a d v e r t i s e m e n t

INTERVIEW

FGS 2012 Advisory Board Interview Series:

Jakub Dvorsk
FGS 2012 Advisory Board Interview Series
This is part three in a series of interviews of the Flash Gaming Summit 2012 Advisory Board. This is your chance to get to know the folks who determine the content of Flash Gaming Summit, getting their thoughts on both the conference and the games industry in general. This weeks Advisory Board interview features Jakub Dvorsk, founder of Amanita Design. In case you have been living under a rock, their game Machinarium has been a huge success on iTunes, specifically hitting #1 on the iPad. Machinarium was also a Mochis Award Show winner at FGS 2010 (Best Game Art category). For more information on Flash Gaming Summit, including passes, speaking, or award show nomination information please visit the conference website.
Introduce yourself- who are you, how big is your team, and how do you participate in the Flash games industry?
in Prague to study animated film. When I was finishing the academy I created my first Flash game (Samorost) as my thesis project and later the same year founded Amanita Design.

My name is Jakub Dvorsk, Im visual artist and game designer. In 2003 I founded the studio Amanita Design, which is now nine employees strong. We are focused mostly on developing independent games (built in Flash) but sometimes also on other projects like films, music videos or some experimental stuff.

What has been your proudest moment since joining the Flash gaming community?

Im most proud of assembling our team a bunch of great friends, professionals and passionate creators.

What did you do before? How did you first get into the Flash games industry? Tell us about your path.

I grew up on 8bit computers and started making my own games when I was 15 on my first PC, I was in grammar school at that time. Later I went to the Academy of Arts

What was your biggest challenge early on with Amanita Design? How does that compare to the types of challenges you face today?

When I started making Flash games I was alone so the biggest challenge was programming I was doing

32

02/2012 (32)

INTERVIEW

it myself which was very tough for me even on a basic level, my head is just chaotic for this kind of work. Nowadays we have a couple of excellent programmers so the biggest challenge is probably game design, more specifically how to make a game entertaining, challenging, accessible, new and original.

broader and more serious in many ways. I see really big potential for creative people from various disciplines from artists, writers, designers and musicians to programmers and engineers.

Do you have any recommendations or advice for game developers who are trying to make a multi-platform hit game? What should they be focused on?

The game must definitely be fresh, distinctive and original and at the same time perfectly executed and polished. Sounds easy right? :)

What is it that you love the MOST about the Flash games industry?

Its easy to create a simple game and publish it on the web or as an app, so any idea can be quickly transformed into a real game and can be played by thousands of people all around the world. This is really great because you can immediately see if it works or not and you can also improve your game according to the feedback you get from your players.

What part of Flash Gaming Summit do you enjoy or look forward to the most?

What do you like the least?


The bugs in Flash.

The best part of almost every game conference or festival is always meeting other developers and players in person.

How has the industry changed since you fist joined?

The whole scene has changed, it was a completely different world when I started with Flash games. When I was searching the web for interesting interactive stuff, there were just a few really good websites and only a couple of games worth mentioning, nowadays there are tens of thousands of games, experimental interactive projects, art projects, websites and portals.

In your opinion, why should people come out to FGS 2012? What should they expect from the conference?

Similarly to my previous answer answer, the most valuable part of conferences for me is meeting some interesting people in person. Its sometimes much more influential than weeks of reading, surfing or watching videos on the web.

The theme for FGS 2012 is Maximize Your Game. How do you think Flash game developers are maximizing their games today? What could they be doing better / differently?

Thanks for your thoughts and insights Jakub, see you at FGS 2012!!

Ill be repeating myself but I think the developers should try to be more original and brave, they should experiment more with art, game mechanics, narrative approaches and with the whole medium which is still unexplored and waiting for young adventurers who wants to create something really new.

COLIN CUPP
Colin is the Product Marketing Manager at Mochi Media. So what does that mean? That means that internally at Mochi he is an advocate for developers and publishers, and externally he talks about products and features. When he is not working or traveling to a far-off land, he enjoys the simple things in life like camping, hiking, Neticking, and playing games. Yes, Neticking is an activity.

Where do you see the Flash games industry going? Whats in store for the future?

A more interesting question to to me is where is the games industry is going? I think the future of the games industry is extremely bright because the medium will be

34

02/2012 (32)

REVIEW

Demo Builder 8
Create 3D Presentations in Flash Format
If you are reading this then you probably have software that you would like to showcase on your website. You would like to show potential customers how it functions and its key features.

imply put, you are looking to outline those features that make your product stand out from the competition. So how should you go about doing this? Tired of using screen recorder tools that create dreary, outdated 2D presentations? (We knew it) Thats where we have the solution. Demo Builder allows you to take your presentations to a whole new level. More specifically, Demo Builder gives you the ability to enhance your presentations with stunning 3D effects to better focus customers attentions to the key aspects of your software. These 3D effects create the Wow effect you needand which keeps customers glued to their screens. You have worked Figure 1. Radu Ionescu, proud member of the Tanida Team hard, so let Demo Builder do your product justice. It deserves the add these 3D effects or you can choose to manually insert these. In fact, attention! once the recording is done, with only one click you can export a complete 3D Now Demo Builder 8 allows you presentation in Flash, H264, AVI, WMV or MP4 format. to create your 3D presentation in Could we make it any easier . ? as easy as 1-2-3 (record, edit, To learn more, please visit our web site: publish). http://demo-builder.com/index.html?src=ffd1 Simply start the recorder and take the actions you want to show in your desired application. RADU IONESCU Demo Builder captures everything I work for Tanida, heading its Customer Relations department. At Tanida, we take all automatically. customer feedback seriously. It is my duty to see that these requests be carried out, as After recording, you may either best as possible. I centred the article around the 3D abilities of Demo Builder because have Demo Builder automatically these are what our customers are most concerned about today.

36

02/2012 (32)

BOOK REVIEW

Game Development by Example


Authors: Emanuele Feronato Publisher: PACKT. ISBN: 1849690901 Language: English Pages: 288 Pages Website: http://www.flashgamedevbook.com/

Flash

manuele Feronato is a familiar name to anyone whos ever searched for something to do with Flash game development on Google. The tutorials he publishes on his blog are as ubiquitous as the platform itself. They provide nuggets of code usually meaty enough to accomplish the task at hand. Be it creating a Match-3 knock-off, a landscape generator or showcasing a new library. The complexity never really leaves the shallow end of the pool, which I suspect is the main reason beginners flock to his site. But with a book you leave the safety zone of this isjust enough behind. When people have put down good money, the expectation levels are rightly higher. So it was with intrigue that I started reading Flash Game Development by Example. It covers the creation of 9 games across 300+ pages, which is an average of 30 pages each. Probably 28 more than he uses on his web site I was curious what this extra space would provide. The first game we make is Concentration or Pairs, the classic card game. Everything is done in the Flash IDE at a size of 550 x 400, and it leads you step-bystep through creating an FLA, creating your Main.as, entering a trace statement to prove it compiles and then explaining what imports and packages are. The explanation for the Sprite package for example is This class allows us to display graphics. Thats true, and

while Im not expecting a detailed explanation at this level I did expect a little more. Emanuele then starts creating the game, kicking off with a loop to make an Array of 20 tiles. Every single line of code is explained rapidly jumping through AS3 syntax as it goes. Its as if the single line of source for (var i:uint=0; i<NUMBER_OF_ TILES; i++) caused Emanuele to stop and realise he had better explain what a uint, a constant and a for loop is before he can carry on. The problem with this approach is you forget what it was you were building as you try to deal with a rapid onslaught of new information. And it doesnt let-up. By page 19 the game is dealing with adding a Fisher-Yates shuffle algorithm. A quick trip back to the Flash IDE creates some tiles, and more code starts displaying them and adding event listeners for clicks. By page 31 youre deep in the realm of indexOf Array checks, event.currentTarget magic value access and modulo operations. Nearly every line of code is still being explained but the pace is borderline frantic. And just like that, it ends. The game is complete, a few homework assignments are given to you and were on to Chapter 2. Chapter 2 is about building Minesweeper. So multidimensional arrays and iterative scanning for mines. It also contains probably my favourite quote in the whole book: Just think about a function like a mad witch. You give her some strange stuff such as bat wings and lizard tails, and after making something mysterious she gives you a potion to turn someone into a frog. The great thing is once youve made your functions (witch) you dont need to know how they do the magic anymore. I would probably rather have had a potion that turned me into a frog than this. For a book that was so carefully explaining, albeit in brief, what a boolean was a few pages ago, it has now descended into the realms of spaghetti. It makes my head hurt just looking at it. Even a seasoned developer would have to waste a few precious minutes deciphering it, so Ive no idea what

38

02/2012 (32)

Flash Game Development by Example

Listing 1. Code taken from the function it teaches you to make:


if (mineField[row][col]==0) { for (var ii:int =-1; ii<=1; ii++) { if (ii!=0||jj!=0) {

for (var jj:int =-1; jj<=1; jj++) { if (tileValue(row+ii,col+jj)!=9) {

if (tileValue(row+ii,col+jj)!=-1) {

floodFill(row+ii,col+jj);

a total beginner will take away. Ironically in Chapter 3 (building a Connect 4 game) he concentrates on splitting code up to make it as readable as possible. The Connect 4 game starts to bring in motion (the pieces sliding down), and has a good section on planning the graphics so everything is the right size and all fits. The illustrations are almost more useful than the source code as theyconvey a meaning, explanation
a d v e r t

and result in one shot, and they continue to be great through-out the rest of the book. The chapter wraps-up by adding AI to the game, both random and defensive play methods. This is a nice touch as it could easily have been left out. Chapter 4 creates a slightly pimped-out Snake clone. Teaching you how to using the Point class and calculate distance between display objects through a Manhattan Distance check. It makes a point of not using an Array for what is a very tile-based game. It feels like a strange choice of game to demonstrate this, but the final game actually works. The source is again full of short-cuts and abbreviations that sprinkle on the magic, obscuring clarity in the process. Even the ENTER_FRAME event has been reduced to onEnterFr (enter the French?) but once more the illustrations come to its rescue: Figure 1. In my mind the above is actually more useful than the code that does it. I do wonder if theres a potential game development book idea here where its just a series of illustrations like the above that all lead to a finished game. With zero source code at all making it language agnostic! Back to the book Chapter 5 builds Tetris, with all graphics generated via AS3 and the trusty Array restored back into service. Tetris is one of those games that is quitea bit harder to code than it appears when
i s e m e n t

BOOK REVIEW

Figure 1. FlashGame Snake Example

you play it. But the chapter does a good job of covering the raw basics. The pieces move whole tiles at a time, which removes that damn, lets quickly slide this bit over there last-minute decision you were allowed to make on the Gameboy version. Itd be nicer if the pieces dropped and slid smoothly, but the way the game is coded that wouldnt be an easy change. Chapter 6 finally sees us creating an arcade game: Astro-Panic! Basically a Space Invaders styled shooter with slightly more dynamic alien movements. Its a fun little game, looks nice and is full of action. Other than a small section dipping into the realms of trigonometry to handle movement vectors I cant help but feel this would have been a much more interesting first game to make than Concentration was. The remaining chapters of the book deal with creating clones of Bejewelled, Puzzle Bobble and Ball Balance (one of Emanueles own games). It all ends with some recommended web site links before leaving you outside in the cold staring at the Index. The new games introduce a few new features but mostly deal with getting the game mechanics correct using what youve already been taught. Its as if the book is trying to fulfil two tasks: teaching a beginner how to make games, and teaching them the fundamentals of AS3 at the same time. I cant help but feel it should have lived up to the title and focused specifically on just making the games themselves. There are multiple good AS3 reference books out there, and while the explanations of AS3 syntax and features in here are just about adequate, they barely brush the surface and often use very beginner unfriendly

terminology. Its also here that I feel Emanuele should have been given a native English speaking proof reader (and if he had one, then a more thorough one!) because there are lots of times where its obvious hes struggling to clearly explain in English what something is. Simple grammatical things that should have been picked up and corrected. If you have at least a bit of AS3 knowledge under your belt, or are a fan of his blog posts, then you should get on ok with this book. The process of breaking the game down into logical components, and the way in which he puts it together almost iteratively, is excellent. Im a big fan of the show and tell approach, where you make small changes, but lots of them, and let the reader witness the results of those changes for themselves. If you are a seasoned AS3 developer then I think you can still get a little, because the approach to the game design and logic is mostly sound, and youll have the ability to totally re-code the source into something more readable! Personally I have issues with the source code. The variable naming, short-cuts taken and deeply nested constructs frighten the hell out of me. If I was shown this sort of code by a developer applying for a job in our team Id politely file them away under the last resort pile. For me source code is at its most useful when you can read it like a good book, and thats certainly not something youre going to learn here. If youve already got a few Flash games under your belt then the majority of this book will be academic to you, but I suspect you arent the target audience. Basically if you like the sort of code and tutorials you find on his blog, youll like the book. If you dont, you wont! I applaud Emanuele for having written this, and I hope it inspires beginner developers whod love to get into Flash game coding. I just hope they supplement it with some of the AS3 heavy-weights like the ActionScript 3 Cookbook or Advanced ActionScript 3 Animation as well, which offer the level of depth they will truly need, and dare I say it, slightly more elegant code in the process.

Figure 2. FlashGame Astro Panic Example

RICHARD DAVEY

40

02/2012 (32)

You might also like