Monday, January 31, 2011

Learn what makes or breaks a successful Flash game with Flash Mindmeld

Learn what makes or breaks a successful Flash game with Flash Mindmeld:

Sixty Top Flash Game Developers (myself included! Damn Italians, they are everywhere) from Around the World to Share Flash Game Development Tips, Secrets and Advice at Online Flash Mindmeld MicroConference.

Flash Mindmeld MicroConference

On February 15th, 60 (myself included, so let’s say 59) of the world’s greatest developers behind Flash games will speak about what makes or breaks a successful Flash game. Knowing what it really
takes to develop a successful game is more critical than ever.

Each participant was asked to respond to the following question: “What makes or breaks a great Flash game?” Common mistakes made in development, how to stand out and what key points separate a good game from a great one are just some of the topics to be covered by these experts.

Each of the 60 Flash developers will present a 60-second tip, creating one of the first “central hubs” for critical information on how to make a great Flash game.

Flash Mindmeld MicroConference Participants

It was very funny to take part to the Flash Mindmeld. When I was asked to record a 60 seconds audio tip, I wrote it down and it was very happy with it, until I realized it took me almost two minutes to read it. So I had to redact it a lot of times, until I came with my 60 seconds tip.

You are warned, my spoken engRish sucks, but you’ll probably find interesting the remaining 59 audio tips.

Meanwhile, register to the Online Flash Mindmeld.

"

66+ Open Source JavaScript Game Engine for Serious Developers

66+ Open Source JavaScript Game Engine for Serious Developers:

Guild Wars icon Javascript is not only welcomed by the web developer or designers, but also more and more mobile device(Such iPad, iPhone, Android etc) oriented developers, we can easily build many amazing games with HTML(5) + Javascript + CSS. Below is a list of JavaScript Game Engine for serious developers, include general, 3D, Animation, Canvas, Math, Color, Sound, WebGL etc. Hope they will be helpful for your work!


1. General JS Game Engine

 Akihabara


Akihabara is a set of libraries, tools and presets to create pixelated indie-style 8/16-bit era games in Javascript that runs in your browser without any Flash plugin, making use of a small small small subset of the HTML5 features, that are actually available on many modern browsers.

Akihabara

 

bdge


BDGE is a game engine written in Javascript that uses HTML5 Canvas and Audio to create in-browser games.

bdge

Canvex: FPS game engine


Canvex is an experimental browser-based FPS game engine in the HTML <canvas> tag, which be believed to work in the following browsers, on any operating system and with no external plugins.

Canvex FPS game engine

 

Cocos2D


Cocos2d-javascript is a 2D game/graphics engine based on cocos2d-iphone but designed to run in the web browser. It uses the latest features available in HTML 5 allowing real-time rendering of 2D graphics without the need for plug-ins such as Adobe Flash.

Cocos2D

Iain Lobb Blog: Web games, HTML5 and Jangaroo on The Creative Coding Podcast

Iain Lobb Blog: Web games, HTML5 and Jangaroo on The Creative Coding Podcast:

Iain Lobb Blog Seb Lee-Delisle


Me and Seb had nothing better to do at the weekend, so we had a chat about web games, HTML5 and Jangaroo, and we're releasing it as a podcast - hopefully the first of many to come! So here it is, The Creative Coding Podcast - Episode 1. Enjoy!

Robotlegs Workshop

Robotlegs Workshop:

Past saturday Erik van Nieuwburg organized an Robotlegs workshop, i learned alot and was more than usefull! I have to say i was quite impressed with its cleanness, automatic listener management and automatic Single.ton() creation.

As an added bonus Eric Paul Lecluse presented his newly created framework that uses Robotlegs (or PMVC) and is called Navi.gator(). The slides are also presented below.

Props go out to Erik for organizing this event; good food, cool people and perfect content! Thanks for that!

Below are the slides + extra links with more info about the Robotlegs Framework


Sunday, January 30, 2011

Why Minecraft Works (Design Concepts)

Why Minecraft Works (Design Concepts): "

Why’s This Here?

I don’t review games. But I do study games, and to that end, I have an interest in dissecting them to figure out what makes their designs work.

Since discussing a game’s features requires no specialized skills or background knowledge, it seemed suitable to share here as a Beginner post.

Background

If you already know Minecraft, skip ahead. If not, here is some information to give context to the rest of this entry:

  • The world is made entirely of 1-meter cubes.

  • Any of those cubes, except bedrock at the very bottom, can be removed or moved, enabling the player to reshape the world.

  • As far as the player can wander in any direction, more terrain will be randomly generated.

  • Day/night cycles pass.

  • Aggressive enemies spawn when and where it’s dark.

  • Underground there are cave systems with lava, iron ore, diamond, and a few other minerals.

  • Above ground there are trees, hills, animals, streams, oceans, cliffs, sandy beaches/deserts, cacti and clay.

Play tends to start out something like this:

  1. The player spawns with no supplies.

  2. Punching trees drops logs, which can be used to create a workbench, a weak wooden pickaxe, and a few other basic supplies.

  3. The wooden pickaxe can be used to break stone, which can be used to make stronger stone tools. Stone pickaxes are then used for coal, iron ore, etc.

  4. Coal and wood are combined to make torches, which cast light to prevent enemies from spawning in otherwise dark areas.

  5. Combinations of materials produce a variety of other objects.

  6. The player dies a few times, learns a few things, tries out a few different kinds of projects. Time passes.

  7. The player then builds the Taj Mahal, or something very much like it.

  8. The Tetris effect kicks in, causing the player to have Minecraft dreams.

My Narrow Experience

[...]

Deface

Deface:

Deface uses XML encoded classifiers to visually detect and track objects (especially faces) in BitmapData. Compatible with classifiers from OpenCV, it is based on ideas from OpenCV and the well-known Viola and Jones face detection paper, but not associated with either.

ActionScript OOP and Design Patterns: Why Bother?

ActionScript OOP and Design Patterns: Why Bother?:

At a workshop not long ago I found myself saying, I’ve got nothing against 4th Graders. It was in relation to the MVC, which is the precursor to the Gang of Four’s catalog of patterns, but it’s appropriate in this discussion as well. Originally, I was asked what I had against MVC, and I said, Nothing, [...]

Friday, January 28, 2011

New Video Tutorial On Building Games With Flixel

New Video Tutorial On Building Games With Flixel:

Flixel logoI just uploaded the first tutorial in a 3-part series showing you how to build a simple game using the Flixel framework. This framework is incredibly easy to use and takes care of most of the heavy lifting for you. In the future I will also be doing a similar series on other frameworks such as Push Button Engine.

Thursday, January 27, 2011

Making a Flash game like Plants Vs Zombies – Step 4

Making a Flash game like Plants Vs Zombies – Step 4:

Welcome to step four. In this step we’ll make plants fire and eventually kill zombies.

Let’s start defining when a plant can fire:

* When there is at least one zombie on the same row the plant is placed
* When it’s not already firing (plants can fire only one bullet at once)
* When a certain amount of time passed since the last time the plant fired

Now let’s define the bullet life:

* The bullet flies from left to right
* The bullet is removed when it hits a zombie
* The bullet is removed when it flies outside the stage

These six concepts bring some great changes in our script, and I tried to organize it in the clearest way possible, while being conscious that putting all the code in a single class starts making the script a bit messy. Anyway, I tried to do my best to keep it readable.

Before showing you the script, you have to say I created a new object called bulletMc which is the bullet itself.

Ready to see an almost 300 lines long code? [...]

Build a Physics-Based Platformer in Under an Hour

Build a Physics-Based Platformer in Under an Hour:

In this tutorial, you will learn to make a physics-based platform game in the quickest way possible with the World Construction Kit.


Final Result Preview

Let’s take a look at the final result we will be working towards:

It’s a little wonky, but that can be fixed — and wait until you see how quick and easy it was to make!


Step 1: Download

Download the Box2D Alchemy Port and WCK libraries. Get the source from github and for more information, see www.sideroller.com.


Step 2: New FlashDevelop Project

Click on ‘Project’ and select ‘New Project’ from the list. Select AS3 Project as your project template, name your project, point it to an empty directory and click OK.

Locate the Box2D/WCK libraries that you downloaded in Step 1 and place the following folders in your new project’s ‘lib’ folder: Box2D, Box2DAS, extras, gravity, misc, shapes, and wck.

Click on ‘Project’ again and select Properties. Click on the ‘Classpaths’ tab and add your lib folder.

Open Main.as in the source file and add the highlighted code. FlashDevelop should have auto-generated the rest.

public class Main extends WCK
{
 public function Main():void
 {
  if (stage) init();
  else addEventListener(Event.ADDED_TO_STAGE, init);
 }

 private function init(e:Event = null):void
 {
  removeEventListener(Event.ADDED_TO_STAGE, init);
  // entry point
 }
}

Step 3: Set Up the Flash IDE

Open Flash Professional. Press Ctrl+Shift+F12 to open Publish Settings. Click the Flash tab. Select the option ‘Export SWC’

Flash physics platformer WCK Box2D

….and then click the Settings button next to the ActionScript 3.0 combobox.

Flash physics platformer WCK Box2D

In the Source Path tab, click on the ‘browse to path’ icon and select your lib folder. Then click on the Library Path tab and select the ‘browse to SWC’ icon. Select the file lib/Box2DAS/Box2D.swc.

Click OK in Advanced Actionscript 3 Settings and again on the Publish Settings window. Save your FLA in the \src\ folder of your FlashDevelop project (the same folder with Main.as).

Finally, press Ctrl+F3 to open the document properties and set the Document Class to Main.


Step 4: Your First World Object

[...]

Wednesday, January 26, 2011

Access All Your Google Analytics Data in Flash/AIR Projects with ActionScript 3 Client Library

Access All Your Google Analytics Data in Flash/AIR Projects with ActionScript 3 Client Library:

google analytics logo Google Analytics blog introduced a new ActionScript 3 Client Library, this library provides a simple way to access your Analytics Data from both AIR Applications and Flash Player (though a proxy). The developers an easily integrate Google Analytics into their Flash/AIR projects with this AS3 library.

“Given the potential value of this library to many other developers, we decided to make it freely available along with its source code,”

says Denis Bulichenko, Director of Business Development at DENIVIP.

google-analytics-results

It’s very simple to embed Google Analytics data into your Application:

1. Download AS3 Google Analytics API library SWC

2. Include SWC library into your project

3. Import library packages

  1. // Main class
  2. import com.denivip.ga.APILoader;
  3. // Google Analytics Account
  4. import com.denivip.ga.GAAccount;
  5. // Dimensions
  6. import com.denivip.ga.dimensions.CampaignMediumDimension;
  7. import com.denivip.ga.dimensions.CampaignSourceDimension;
  8. // Metrics
  9. import com.denivip.ga.metrics.VisitorBouncesMetric;
  10. import com.denivip.ga.metrics.VisitorVisitsMetric;
  11. // Filters classes
  12. import com.denivip.ga.filter.Filter;
  13. import com.denivip.ga.filter.FilterItem;
  14. import com.denivip.ga.filter.FilterOperator;
  15. // View classes
  16. import com.denivip.ga.view.GAView;

4. Configure Google Analytics API request through APILoader class and initiate connection [...]

Game developer: “Why I’m Moving From HTML5 To Flash”

Game developer: “Why I’m Moving From HTML5 To Flash”

No… That’s not a typo. Yes… You read that correctly. This game developer is dropping HTML5 in favor of Flash!

These guys are working on a game that recently got a lot of attention on Reddit and Twitter. The prototype is written in HTML5/JS but they are now abandoning HTML5 and are moving to Flash!

Their main concerns are the “spotty” browser support, slow performance and the fact that there is no ecosystem for selling HTML5 games.

Is html5 the future? I sure hope so! Unfortunately, it isn’t the present.

Full story on http://blog.tametick.com/2011/01/why-im-moving-from-html5-to-flash.html [...]

How to use our Simple Sequencer

How to use our Simple Sequencer:

Imagine: MovieClip A is supposed to play for 87 frames, then stop. MovieClip B then slides in and when it reaches its stopping point, MovieClip C fades up. When all that’s done, we’ll load the user’s Facebook profile if they’re logged in and if not, MovieClips D and E will then sequentially animate in respectively. The code isn’t hard to write... there are just so many events and handlers that you wind up with a hundred lines of code just to handle the order of animations. Sound familiar?

Lua for ActionScript Developers: Crash Course

Lua for ActionScript Developers: Crash Course:

Skip Intro

Preface

I needed a break from Flex for mobile, and wanted to see if there were any other good application frameworks that allowed you to deploy to multiple devices beyond Adobe AIR. Tony Lukasavage had written about a few recently, and Matt Guest had written about his quick experience using Corona for games based on the buzz around Robert Nay, the 14 year old who knocked Angry Birds out of the top mobile game slot via Bubble Ball.

While Unity has the best language on the planet, C#, I needed a break from lower level languages.  In the past, Ruby and Python were great reprieves for doing smaller projects.  In doing some mobile apps, I’ve noticed that for the scope of the project, sometimes 3 weeks or less, the verbose language actually gets in the way.  So, I was looking for a higher level language, and Lua in Corona SEEMS to fit the bill, but I’m still learning.  I liked how I could save a file in TextMate and and it would just refresh the iPhone/Android emulator. HOTNESS! Uber fast compared to mxmlc and “Building…” in Flash Builder, even when using pure AS3.  The interpreted nature of Lua helps speed that up (I guess).

Introduction

I’ve only been reading up on Lua for 1 day, but here’s a quick crash course to get traditional ActionScript programmers up to speed with Lua concepts.  If you’ve done any ActionScript 1, or even JavaScript, you’ll find this very familiar to traditional ECMA concepts.  If you’re a Java/C guy coming to Flex and now reading this, it may be a little weird.

I’m still learning the OOP & packages Lua stuff, so will post that in a later article.  In reading the docs, it’s pretty clear OOP and packages aren’t really something the original language designers figured you’d actually do, so it seems like a ton of work, more than it took in AS1, to get inheritance and packages.

WARNING: This guide was written primarely to help me learn Lua and have all the common comparisons on one page.  I’m sure it has errors and misconceptions; if I get railed in the comments, I’ll update this post as soon as possible.  Here there be dragons, bitches!

Getting Started

If you’re on a Mac, the best thing to do is go download & install Corona + TextMate, and then install the Corona Bundle for TextMate.  For Windows users, you can check out more on their blog.

Output

To show output from your code in ActionScript for the Flash IDE’s console, or Flash Builder’s console, you use trace:

trace("Hello World!");

In Lua, you use print:

print("Hello World!")

You’ll notice there is no semi-colon used in Lua. Like ActionScript they are optional, but most code I’ve seen doesn’t use them. I’ve only met 1 ActionScript coder that didn’t use semi-colons.

There are also no brackets {} in Lua, similar to Python, although the whitespace isn’t as strict[...]

Tuesday, January 25, 2011

Flash Network Profiler – What are YOU downloading?

Flash Network Profiler – What are YOU downloading?:

FlashPreloadProfiler RC2

Loaders Profiler

This time, it’s all about loading files.
This new profiler show you every file being loaded using

    - flash.display.Loader
    - flash.net.URLStream
    - flash.net.URLLoader

The profiling is simple, it’s going to show:

    - Current download progress
    - HTTP Status
    - File Size
    - File Url (for every display Loaders, and URLStream with IOError)

You can copy to clipboard the URL or the Errors with the left side icons.
You can also save the whole list of downloads with a “save all” option

You don’t have access to:

    - URL of display loader while it being downloaded.
    - URL of URLStream and URLLoader when download is succesful

Configs

[...]

Creating PDF files with Flash

Creating PDF files with Flash: "

Perhaps not everyone knows that you can create / print the PDF in real time with Flash Actionscript 3.0 and PHP.

To begin, I suggest you to download the library of AlivePDF by ByteArray.org at the following address: http://code.google.com/p/alivepdf/downloads/list.
You will find the documentation here: http://alivepdf.bytearray.org/alivepdf-asdoc/.

Then you will need the class PNGEncoder.as, found here: https://github.com/mikechambers/as3corelib

In this tutorial we’ll see how that library works with Actionscript 3.0 to create PDF in real time.
Important: this class works only on web servers cause of some security aspects of the SWF. Then try it on a web server or locally with MAMP or XAMPP.
The PDF file will be created in a folder called "pdf" that resides in the same directory as the file create.php.

First of all I am writing a PHP file (create.php) that is able to create a PDF from the bytes that Flash will generate [...]

SWFAddress, SEO and the Flex Datagrid for Cut and Paste Coders

SWFAddress, SEO and the Flex Datagrid for Cut and Paste Coders:

This article shows you how to set up deep linking in your Flex application that can be seen by end users as well as search engines.

It’s a tutorial mainly for all of the other cut-and-pasters out there who don’t have the time or energy to truly learn how to create a proxy class for use with SWFAddress, and most likely aren’t programmers by trade.


Final Result Preview

Let’s take a look at the final result we will be working towards, notice how the browser bar reflects the title of the page, Beginning:

flex app with browser navigation

Download the Source files and use them as a reference while you read this tutorial.


Background

This is my first Flex tutorial, and one I can only write after stating the following caveat: I am really just a cut-and-paste coder, albeit one with nearly 10 years of AS1, AS2, and now AS3 experience, which has given me a pretty good comfort level with it. I do write a few functions, if-statements, vars, and things like that — but I’m more of a hackmeister than anything, which sometimes leads to creative coding, while other times leads to wasted time on things I haven’t read enough about before experimenting with!

Deep linking is about a lot more than just SEO; it’s about usability. I think a lot more about usability after having built an e-learning app. Now I notice when a Flex or Flash app backs you completely out of the app when you hit the back button, and think how I don’t want my users to experience that annoyance. Who wants to scroll through all of your lessons looking for the one activity they want to do again, or email to their friend?

Deep linking is about a lot more than just SEO; it’s about usability.

This is a tutorial mainly for all of the other cut-and-pasters out there who don’t have the time or energy to truly learn how to create a proxy class for use with SWFAddress, and most likely aren’t programmers by trade. While I can appreciate some of the tutorials from the SWFAddress site that give a lot of technical minutiae about why you have to do things properly, and how bad practices will break your app, etc — sometimes a person just needs a way to make things work in a way they can understand. Some of those articles make you think that you can’t possibly get deep linking working unless you can write oodles of code yourself.

The reason I’m going to share my coding experience on this is because I googled the heck out of SWFAddress, datagrid, and Flex, to no avail. I didn’t find any direct examples of somebody using SWFAddress to create dynamic URLs from their datagrid within their Flex app. My husband joked that it must be because it’s so obvious that nobody has bothered to blog about it, but as you can find Flex examples, tutorials, and code for nearly every basic coding issue, I highly doubt that. So here you go!


Step 1: Gather your Tools

You will need the following items in order to complete this tutorial:

  1. Your Flex/Flash building IDE (Flex Builder, Flash, FlashDevelop , etc).
  2. SWFAddress 2.4 and SWFObject 2.2
  3. GAforFlash (Google Analytics Tracking For Adobe Flash).
  4. A good spreadsheet app.
  5. An Apache or PHP setup you can test with, or website you can upload and test to.
  6. A good search and replace editor like Notepad ++ to clean up the text you take out of the spreadsheets.
  7. The free Vigos Gsitemap creator.

You can also download the file package for this tutorial, which includes a key file containing the actionscript examples from below: RoutingEvents.as[...]

Monday, January 24, 2011

ActionScript 3.0 Saturated Abstract Factory 6: The Abstractory

ActionScript 3.0 Saturated Abstract Factory 6: The Abstractory:

Every Family Needs a Factory In the last installment of the saturated Abstract Factory, you saw that unlike the Factory Method where a concrete factory instantiates a single concrete product, the Abstract Factory instantiates a family of products. In this final post in the Abstract Factory saturation series, you will see how the factories (creational classes) [...]

Class Dependencies

Class Dependencies:

One of AS3′s strong suits is its ability to very easily use classes in a dynamic way. Every once in a while, this leads MXMLC to completely remove some of your classes from the output SWF and you then get some very strange behavior. Read on for some strategies for using dynamic classes without going insane [...]

AS3 – internal class, public method

AS3 – internal class, public method: "

Juten Tach,

a little quiz again. We have three classes:

The first one is the main class of our swf, InternalTest:

package {
 
   import flash.display.Sprite;
   import testPackage.PublicClass;
 
   public class InternalTest extends Sprite {
      public function InternalTest() {
 
         var publicClass:PublicClass = new PublicClass();
         var ref:Object = publicClass.returnInternalClassRef();
         ref.doSomething();
         ref.doSomethingInternally();
      }
   }
}

Ok, in a package “testPackage” we have two other classes, PublicClass and InternalClass [...]

Saturday, January 22, 2011

FancyGallery source codes available for 3rd party developers.

FancyGallery source codes available for 3rd party developers.:

All Flash developers know it takes plenty of resources and time to develop content management system for Flash from the scratch. FancyCMS wants to give a hand of help to our colleagues :-) In this article we will share source codes of our Flash Galleries and provide some guidance regarding xml structure and basic elements required to create a gallery. This simple application helps you to make cash in 3 steps.

1. Create custom flash gallery

2. Save it in FancyGallery file format

3. PROFIT! :-)

Now lets take a closer look a every single step. First of all you should download FancyGallery source files. The package contains full functional example of CMS Flash Gallery. You can use it as a basis for your future project, though if you want to get better sales we recommend spend some times on animation effects and transitions. Please remember! The original XML structure and folders structure MUST BE PRESERVED! The CMS application interacts with xml files and folders only, leaving the original .SWF file intact. Your project must be AS3 based.  If you corrupt XML feed the CS application won’t be able to handle it properly.

Next step is saving your project in FancyGallery compatible file format which has .FGT extension. Well, that’s pretty easy. You should install FancyGallery application on your PC, choose “Key” icon from the main menu and point the dialogue window to the folder containing your project. The application will collect all data and save it as .FGT file which can be imported in the CMS later by your customers.(we promise to publish video tutorial later ;-) ) [...]

Corona SDK, a short stack

Corona SDK, a short stack:

One of the elements that I most like about Corona SDK is that it is built atop a short but solid stack. Here are the elements:

Corona SDK Parts:

  • Lua 5.1 Interpreter – 110Kb interpreter
  • OpenGL ES 1.1 and 2.0 – The graphics hardware acceleration standard
  • Native Libraries – Injected at compilation depending on the platform
  • Not a ounce more!!!

The Lua 5.1 interpreter is written in C and is thus highly portable. It has been widely adopted within the gaming industry given it’s tiny footprint. The entire interpreter + vm + systemlibs + gc + coroutines + data types are implemented in ~110Kb and there are extremely few platforms where Lua doesn’t run today.  Given the footprint, it is easy to embed the entire interpreter within an application where the result with graphics and logic outputs a file 300Kb at the low end. As the entire vm is embedded within your application, you are only a compile away from adding in the latest features. Lua also brings in 10+ years of portable libraries to choose from LuaRocks, Lua-users Samples, and if you are really interested full source for the VM is openly available.

One of the big mental hurdles to get past with Lua is that interpreted does not mean slow. Here is a good set of benchmarks to look at. Lua is well within the required range of performance for interactive development. I would suggest spending all of 5 minutes looking into Lua performance and then forget about it. Lua 5.1 within Corona SDK is fast enough for any mobile application and hardware will only improve things moving forward [...]

Friday, January 21, 2011

Cirrus January 2011 update

Cirrus January 2011 update:

Regarding the latest info from Michael Thornburg (Adobe) Codename Cirrus got refreshed and you can now leverage new two features.

One of them is sending developer key as as a second parameter of connect method, which improves security as key is not transmitted via URI.

So now you can call:

   var nc:NetConnection = new NetConnection();
   nc.connect("rtmfp://p2p.rtmfp.net", "000000000000000000000000-000000000000");

Second feature enables you to send direct relayed messages to clients, this can be helpful for some kind of signaling or init. We highly recommend to use this only one or twice per connection as it consumes much more resources on Cirrus than P2P introduction.

  // on sender peerID 9876 sending to peerID 1234
   nc.call("relay", null, "1234", "INVITE");
 
   // on receiver peerID 1234, this callback happens
   nc.client.onRelay("9876", "INVITE");

Original post here.

Use the Flash Project Panel‏ to Build a Dynamic AS3 Menu

Use the Flash Project Panel‏ to Build a Dynamic AS3 Menu: "

During this tutorial, we’ll use the Project Panel in Flash to create a vertical animated AS3 menu. The whole process will allow you to easily customize all aspects of the menu using the parameterized constructors. Read on to learn more!


Final Result Preview

Let’s take a look at the final result we will be working towards:


Step 1: Create a New Project

Start by creating a new project. Open Flash and go to File > New, then select Flash Project. The Project panel will appear.

Create a New Project

In the Projects dropdown select New Project. Type the project name “AnimatedMenu”. In the Root Folder, browse and choose where you want to save your project; you can select an already existing folder or create a new one. Make sure the ActionScript version is set to ActionScript 3.0 and click Create Project.

Creating a New Project

Step 2: Add the Classes Folder

Now that the project is created, we are going to add a new folder to group in it our classes. Still in the same panel “Project” press the “New Folder” icon in the bottom, name the new folder “Classes” and click Create Folder.

Add the Classes Folder for simple Flash menu tutorial

Step 3: Install TweenLite

During this tutorial we will use the TweenLite classes from GreenSock for tweening, so we need to add it to our project. Download it and extract it, place it in your project folder (so you will have AnimatedMenu/com/greensock/).

Now if you refresh the Project panel you should see this structure:

Install TweenLite for simple Flash menu tutorial

Step 4: Create a New Flash File

Click the “New File” icon in the Project panel to create a new file, name it “AnimatedMenu.fla” (make sure that the File Type is Flash File) and click Create File [...]

Thursday, January 20, 2011

Writing a Caching Engine for Flash Player

Writing a Caching Engine for Flash Player:

Writing a Caching Engine for Flash Player

Not to be confused with Object Pooling, I’m referring to saving data you need to persist in your application across sessions, and more specifically about saving images in your own local cache as opposed to the browser cache.

Simple Flash GUI Tool

Simple Flash GUI Tool:

Simple AS3 GUI

Keith Peter’s Minimal Components are an excellent tool for any Flash developer when it comes to adding realtime configuration to a SWF. I find myself using them a lot in my demos and prototypes but for sketches with many editable parameters it’s still a hassle writing boilerplate code to set up and arrange the components, as well as adding the appropriate event handlers.

Inspired by GUI tools for OpenFrameworks such as ofxSimpleGuiToo and ofxTweakbar, and ControlP5 for Processing; I thought it was time to have an equally fast and easy to use GUI tool for Flash AS3 projects.

Introducing SimpleGUI

SimpleGUI is a single Class utility designed for AS3 projects where a developer needs to quickly add UI controls for variables or functions to a sketch. Properties can be controlled with just one line of code using a variety of components from the fantastic Minimal Comps set, as well as custom components written for SimpleGUI such as the FileChooser.

SimpleGUI Currently exposes the following methods, as well as an open addControl method where any Class definition can be passed [...]

Flash Platform Versioning

Flash Platform Versioning:

As I mentioned before, I was working on a 'tutorial' concerning versioning within the Flash Platform. This is now done enough to share: Flash Platform Versions. It's a little heavy, and more of a brain dump than a tutorial, but hopefully it can shed some light. There is one big takeaway: Nothing is in sync anymore. For example Flash Player is currently at version 10.1. Flash Professional, which used to be in sync with Flash Player, is now at 11. Additionally, though the latest SWF version [...]

Iain Lobb Blog: Free Flash game source code! Win Adobe Master Collection!

Iain Lobb Blog: Free Flash game source code! Win Adobe Master Collection!:

Stanford

I've decided to give away the full source to a Flash game! Here's why - Mark 'ickydime' Grossnickle has organised a game development contest to coincide with Stanford University's annual charity 'Hackathon'. Anyone can enter (that means you!) and the top prize is a copy of Adobe Creative Suite Master Collection (that's all the Adobe software basically) worth $2500.

The theme of the contest is 'benevolence' which basically means being charitable and generally a good person. Mark has asked me to help judge the contest, so I can't enter, but I thought my benevolent act could be giving away the source code to a game, to get you started or help you learn game dev.

Ok, so it's not really a full game, but it is a working game engine with a playable character, enemies, bullets and NPCs. You can see it in action here (arrow keys and spacebar) and download the source code here. It compiles in the Flash IDE, so if you want to use the Flex compiler you'll have to hack it a bit.

Wednesday, January 19, 2011

Introducing MinimalConfigurator

Introducing MinimalConfigurator:

This is a concept I’ve had for a while, and last week started to implement it. It wound up being orders of magnitude simpler than I imagined. The core part of it was done days ago. I cleaned things up more recently and finally checked it in and made some examples. As easy as Minimal Comps are to instantiate and set up, once you start getting into more complex layouts with lots of components, you can still wind up with a messy bunch of code. Well now you can create your layouts in an external xml file and leave your classes to handle the logic, as it should be.

The concept is to load an XML file, similar to MXML (you can call it MCML if you need a name for it), that defines what components are to be instantiated, and all their properties. In keeping with the minimal theme, it’s not as hard core as something like MXML. You won’t find data binding or in line ActionScript, or styles, etc. And ALL properties are expressed as attributes, not nested tags. But I am happy to say I worked out some pretty neat things that I originally thought would be more difficult.

One is that a component that has an id attribute will be mapped to a public variable in the parent container if such a variable exists, so you can code things around these created components. For example public var btn:PushButton; will map to < PushButton id="btn"/>.

Second is that you can nest components for those components that can have children. Some components, such as Window, Panel, ScrollPane, expect children to be added to a content property, while others, such as VBox and HBox are added directly. These are both handled correctly. So you can write [...]

Creation of realistic Flash water ripples with AS3

Creation of realistic Flash water ripples with AS3:

This is basically the Flash porting of the Flex experiment made by David Lenaerts in his blog.

I found the script a very interesting way to use the NascomASLib, an open source AS3 library that provides a couple of interesting graphic effects such as pixelate and rippler, the one used in the example. The point is the original source code was written for Flex, and reading through the comments it wasn’t easy to change the embedded image with one used in the library. Some comments even say to use the Flash timeline.

That’s why I provided a quick AS3 solution to achieve this effect with no headache.

This is the script:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package {
 import flash.display.Bitmap;
 import flash.display.Sprite;
 import flash.events.MouseEvent;
 import flash.display.BitmapData;
 import flash.utils.Timer;
 import flash.events.TimerEvent;
 public class Ripple extends Sprite {
  private var myRippler:Rippler;
  var rippleTarget:Bitmap;
  public function Ripple() {
   var rippleBitmap:BitmapData=new BitmapData(640,480,false,0);
   var ripplePicture:toRipple=new toRipple();
   var timer:Timer=new Timer(100);
   timer.start();
   rippleBitmap.draw(ripplePicture);
   rippleTarget=new Bitmap(rippleBitmap);
   addChild(rippleTarget);
   myRippler=new Rippler(rippleTarget,20,5,5);
   stage.addEventListener(MouseEvent.MOUSE_MOVE,onMouseMoveTriggered);
   timer.addEventListener(TimerEvent.TIMER, onTimerTriggered);
  }
  private function onMouseMoveTriggered(e:MouseEvent):void {
   myRippler.drawRipple(rippleTarget.mouseX,rippleTarget.mouseY,20,1);
  }
  private function onTimerTriggered(e:TimerEvent):void {
   var posX:Number=Math.random()*640;
   var posY:Number=Math.random()*480;
   myRippler.drawRipple(posX,posY,15,5);
  }
 }
}

The core lies in line 9 which calls the Rippler class that I modified to work as a standalone class (you will find it in the downloadable source code at the end of the post), then at line 13 that constructs a toRipple object, that is the MovieClip Symbol with the background image [...]

Tuesday, January 18, 2011

New Site zReference

New Site zReference:

Actionsnippet has been pretty inactive for the last few months. I took a short break from blogging, but I’m starting up again on a new site… go check it out: zReference

Building a multiuser Sudoku contest game using the Adobe Connect Collaboration Builder SDK

Building a multiuser Sudoku contest game using the Adobe Connect Collaboration Builder SDK:

Use event synchronization techniques and the Adobe Connect Collaboration Builder SDK to create a multiplayer game.

The Particle Sessions : Part One, Is this it ?

The Particle Sessions : Part One, Is this it ?:

Particles

Part One of the Particle Session kicks off with looking at a system similar, but simpler then this Bloom particle experiment (music made for it by the fantastic artist Rich Bologna, thank you again for it, Rich!). We’ll be taking slow steps of optimizations and at the end have a get prepared for the next level. To be able to get up to speed with the working of the video particles, we’ll start from the beginning and work our way up. For that reason, we’ll start very simple and look at a basic unoptimized particle system with next to zero functionality, and modify the code for performance.

Basis : The Particle

The opening picture of this post is the album cover of The Strokes – Is This It. It being one of my favorite albums, I have listened to it many times, but never noticed what the cover really was. It’s amazing & inspiring what imagery one can get from science. Now put on your headphones and listen to that album while reading this post.

Over the last years I’ve more and more started enjoying introductory books about theoretical physics. In complete honesty, it wasn’t even that long ago that I didn’t know that the Boson in the Higgs Boson wasn’t the other guy discovering it, next to Mr.Higgs. You know, like the Hale-Bopp comet was discovered by Hale & Bopp.

Luckily for us and this post, we don’t need to deal with wave particle duality and quantum entanglement, but we can achieve seeming complexity by using simplicity.

Getting started : Simplicity & Complexity

The simple core particle we will be using in this session get its complexity from its display of large numbers of them, not from per instance properties. To illustrate that, let’s start off with a simple particle object in AS3 [...]

Monday, January 17, 2011

Typecasting: Part 3

Typecasting: Part 3:

Today’s article is a followup to an article (Cast Speed, itself a followup to Two Types of Casts) from September that continues to gather comments. Sharp-eyed reader fastas3 brought up a good point that warranted some further investigation into the topic. So today we’ll be taking yet-another look at typecasting in AS3 to try to [...]

15 Useful AS3 Snippets on Snipplr.com

15 Useful AS3 Snippets on Snipplr.com:

When working with Flash and Actionscript 3.0 you may often find yourself repeating code from one project to the next. Creating your own library of reusable code snippets (on snipplr.com for example) is a great way to speed up development. Check out these 15 snippets which you may find useful for integrating into your own code library.

Some of the following snippets are presented here as functions which can simply be used as-is. While you should be able to drop these into your own code as needed, I highly recommend you take the time to really look at the code to get a deeper understanding of what is happening. Looking at code snippets is a great way to learn new techniques and improve your programming skills overall.


Introducing Snipplr.com

Snipplr is one of Envato’s most recent acquisitions. A code snippet repository, a social hub and a darn useful addition to the Envato toolbelt! With Snipplr you can keep all of your frequently used code snippets in one place, accessible from any computer. You can share your code with other visitors and make use of what they post.

Snipplr

You can follow @snipplr on Twitter and keep up to date via the new Snipplr Facebook page. If you have any of your own AS3 snippets you’d like to share, add them to Snipplr and leave the url in the comments!

Marketplace user? Why not link to your Snipplr account from your Marketplace social profile?

1. Randomize an Array

To randomize an array we loop over the length of the array, removing an object chosen at random and then adding it back onto the Array’s end position. Think of this as having a deck of cards where you pick a card at random from the deck and move it to the top of the stack repeated for the total number of cards in the deck.

It’s important to note that the splice method returns an Array containing the removed object and not the object itself hence adding the [0] after the splice call to reference the contained object.


2. Position Display Objects in a Grid Layout

This is a short way of positioning display objects in a grid layout. It makes use of the modulo operator (%) to position each display object along the x axis and the floor method of the Math class for the y position.

This example creates 20 instances of a custom display object called MyDisplayObject positioning each instance in a grid 5 columns wide. As you may have guessed, the two 5′s in the snippet represent the number of columns in the grid.


3. Remove All Children From a DisplayObjectContainer

DisplayObjectContainer, a parent class of the more common container classes such as MovieClip and Sprite, does not have a built in method to immediately remove all children. To remove all children we simply use a while loop to remove the child which occupies index 0 in the stack until no children remain.


4. Get URL of the Page Where SWF is Embedded

[...]

Thursday, January 13, 2011

Toaster Lite – HTTP/AMF monitoring tool

Toaster Lite – HTTP/AMF monitoring tool:

My little pet project called Toaster Lite has finally reached the point at which I can share it with the world. In its current state it is just a simple HTTP/AMF monitoring tool that lets you introspect your client-server traffic when doing your Flash/Flex development. So it is something like Network Monitor in Flash Builder [...]

SWFSheet Version 1.1 beta

SWFSheet Version 1.1 beta:

SWFSheet screenshot

It snowed here in Boston on Wednesday. Enough that I didn’t make it out of the house. Or at least not out of the driveway with shovel in hand. So, with a day off, I worked on adding features to SWFSheet. From yesterday’s post, I successfully implemented features 1-3. To recap and expand:

1. PNG Sequence Export. Click on the new button “Export PNG Sequence” and a small window will pop up. Here you can enter the prefix to save the files with (“frame_” by default), and browse to a directory to store them.

2. Custom Sprite Sheet Sizes. There’s a new radio button in the size section, called “Custom”. There’s also a button there that will pop up another small window allowing you to set the size of the custom sprite sheet size, up to 4096×4096. Nuff said.

3. MetaData Saving. Click the Save MetaData button and yet another small window will open. This has a group of radio buttons allowing you to choose an export format. The first is the Zwoptex xml/plist format used by cocos2d. Then the Corona format, which should save in a format defined here. There’s a generic XML format I created, and the Sparrow format, which is essentially the same with slightly different names, and a raw text format that is just a comma-delimited, one-frame-per-line text dump of x,y,w,h [...]

Quick-Tip: Throwing Errors the Clean Way

Quick-Tip: Throwing Errors the Clean Way:

There comes a time while developing, especially when developing for other developers, that you think “I should really anticipate this error”. This Quick Tip will show you how to do it — the clean way.


Step 1: Throwing

Often, you’ll try to anticipate a bug but end up just tracing something out. Whilst debugging you would find it really useful to throw an exception to make your code stop from executing further, or give some more information about why the error is happening. To do that you need to throw an error to the user, meaning Flash’s debug player will be able to catch it, as will the console when exporting directly from Flash Professional.

Let’s say I’m building a User class; it’s a static class with parameters like name and gender.

Now let’s say I want to catch if the user inputs something other than M or F in his/her gender [...]

Wednesday, January 12, 2011

Making a Flash game like Plants Vs Zombies – step 3

Making a Flash game like Plants Vs Zombies – step 3:

Here we go with 3rd step of Plants Vs Zombies game. Now we will place the bought plant on the game field and let the zombies enter.

Adding a zombie is quite easy because we manage it in the same way we managed the sun. Just like suns appear out of the top of the stage and then fall down, Zombies appear out of the right edge of the stage and move left. They don’t interact with plants yet.

As for placing the plant, we have to make sure when the player presses the mouse while dragging the plant that the tile he wants to place the plant is free and it’s inside game area. Then the plant is placed, the selector and the listener are removed, and the routine starts again with the player collecting suns and selecting which plant (only one available at the moment) to place on the game field.

I commented line by line the whole code, to help you understanting what’s happening [...]

Adobe Vs. Unity: The Future Of 3D Web Games

Adobe Vs. Unity: The Future Of 3D Web Games:

game characterAs Adobe marches towards a Q2 launch for its Molehill, the 3D version of Flash, developers must decide whether to aim for that, Unity 3D, or an in-house solution -- Gamasutra investigates [...]

Tuesday, January 11, 2011

SWFSheet – create sprite sheets from SWFs

SWFSheet – create sprite sheets from SWFs:

SWFSheet is a program I created in most of a day back in late December. I finally polished it up this week and it’s now ready for release. The idea is to take an animation created in Flash, and generate a sprite sheet from it. A sprite sheet, for those of you who may not be familiar, is a single large bitmap containing several frames of an animation, usually layed out in a grid. These can be loaded in very efficiently by games, and each frame shown to recreate the animation.

I had the idea for this program while attempting to port some Flash stuff to the iPhone. And later while making other mobile games, I found that Flash was still the best tool to create animations. It has a powerful time line, easy to use drawing tools, tweens, 3D, and of course, powerful scripting with ActionScript. However, getting a nice looking Flash animation into a sprite sheet that could be used with cocos2d on the iPhone/iPad or with XNA for Windows Phone 7 was not so easy. I did it by hand a couple of times, and it wasn’t very fun. Thus, SWFSheet was born.

SWFSheet is an AIR application and has been tested on Windows and Mac. You create your SWF however you want. Flash CS5 or earlier, Flash Builder, or anything else that outputs a SWF. It doesn’t matter how it’s created. Then you load the SWF into SWFSheet [...]

Monday, January 10, 2011

Second Video Tutorial On Isometric 3D Is Live

Second Video Tutorial On Isometric 3D Is Live:

isometric pictureI just uploaded the second tutorial covering the as3isolib library. In this tutorial I show you how to prepare your custom artwork in Flash and incorporate them in Flash Builder using a SWC file. Basic isometric animation is also covered using the great TweenMax library [...]

Default Arguments

Default Arguments:

I’ve talked about var args, the arguments keyword, and even the length of a function that has default arguments, but I’ve never written an article all about default arguments… until today. As a refresher, default arguments look like this: function foo(a:int, b:int=3): void { } In the above example, a is a required argument and [...]

Saturday, January 8, 2011

The world, virtual

The world, virtual:

Lately it has been hard for me not to see recent trends ranging from gamification to the increasing prevalence of robots in the household as a sign of the way the real world is starting to imitate a virtual world.

  • We’re adding friends lists via well, everything
  • And bots via robots
  • and reputations via LinkedIn
  • and auction houses via eBay
  • and secure trade via Craigslist
  • and profiles via Facebook
  • and virtual currency with Facebook Credits
  • and quests via serious games
  • and points for meaningless grinding via gamification
  • and strategy guides via Quora
  • and guild chat via status updates
  • And stats to ourselves via ‘quantified self’ approaches
  • And classes and skills via the march of specialization in job roles

Now, you may say that all of these are things that existed before. Yes, and we then built adapted versions of them for the virtual world that accommodated the fact that they were being simulated in a virtual space. And now those adaptations are being ported back to meatspace. We could call these three stages of development:

  1. real world, inhabited by people
  2. virtual world, inhabited by users
  3. wold virtual inhabited by userplayers

New Video Tutorial Covering Isometric 3D Basics

New Video Tutorial Covering Isometric 3D Basics:

iso pictureI just uploaded a new tutorial that covers the basics of setting up an isometric 3D world using the open-source as3isolib library. I show how to use the built-in primitive objects but the next tutorial will focus on how to incorporate your own isometric artwork [...]

Pixel Smash Source Code Released

Pixel Smash Source Code Released:

Photonstorm faceJust a quick one, but some people asked me if I’d send them the source to the Pixel Smash demo I posted the other day. I figure it can’t hurt, so I’ve packaged it up, removed some useless bits, added comments and thrown it together in a zip.

Pixel Smash source code (includes Flash Develop project, set-up with Nape linked in ready to compile)

Should work “out of the box” on PCs running Flash Develop. Will need rebuilding in anything else. It isn’t optimised by a long shot, so make of it what you will [...]

Friday, January 7, 2011

Digging more into the Molehill APIs

Digging more into the Molehill APIs:

A few months ago, we announced at Max 2010 in Los Angeles, the introduction of the Molehill APIs in the Adobe Flash runtimes on mobile and desktop. For more infos check the “Molehill” page on Adobe Labs. I wanted to give you guys more details about Molehill, some more technical details on how it is going to work from an ActionScript developer standpoint.

So let's get started ;)

What is Molehill?

“Molehill’ is the codename for the set of 3D GPU accelerated APIs that will be exposed in ActionScript 3 in the Adobe Flash Player and Adobe AIR. This will enable high-end 3D rendering inside the Adobe Flash Platform. Molehill will rely on DirectX9 on Windows, OpenGL 1.3 on MacOS and Linux. On mobile platforms like Android, Molehill will rely on OpenGL ES2. Technically, the Molehill APIs are truly 3D GPU programmable shader based, and will expose features that 3D developers have been looking for since a long time in Flash, like programmable vertex and fragment shaders, to enable things like vertex skinning on the GPU for bones animation but also native z-buffering, stencil color buffer, cube textures and more.

In terms of performance, Adobe Flash Player 10.1 today, renders thousands of non z-buffered triangles at approximately 30 Hz. With the new 3D APIs, developers can expect hundreds of thousands of z-buffered triangles to be rendered at HD resolution in full screen at around 60 Hz. Molehill will make it possible to deliver sophisticated 3D experiences across almost every computer and device connected to the Internet. To get an idea of how Molehill performs and see a live demo check this video.

The way it works.

The existing Flash Player 2.5D APIs that we introduced in Flash Player 10 are not deprecated, the Molehill APIs will offer a solution to advanced 3D rendering requiring full GPU acceleration. Depending on the project that you will be working on, you will decide which APIs you want to use [...]

Beginner’s Guide to FlashDevelop – Basix

Beginner’s Guide to FlashDevelop – Basix:

Two common misconceptions about Flash Professional: first, you have to buy it in order to make Flash apps and games; second, it’s a decent tool for writing code. Totally untrue.

In this article, we’ll see how to use the free Windows application FlashDevelop to work on Flash projects — both with and without Flash Professional.


What’s So Great About FlashDevelop?

You can create Flash projects with any text editor, so what makes FlashDevelop so special? Here are my top six favorite features:

Code Completion

Type someMovieClip.got and it’ll offer gotoAndPlay() and gotoAndStop() as possible options to choose from. You can continue typing to narrow the choice down, or use the arrow keys to select a specific option, then hit the Tab key to make FlashDevelop automatically write the rest of the keyword.

FlashDevelop Code Completion

Also, FlashDevelop can match text from anywhere within the keyword, so someMovieClip.pla will offer both play() and gotoAndPlay() as possible options.

Automatic Imports

Type myMovieClip = new MovieClip(); and FlashDevelop will automatically add import flash.display.MovieClip; to the correct place at the top of the class file.

This also works for classes that aren’t built in to Flash, including classes that you’ve written yourself. If your project contains the class com.activetuts.examples.ExampleClass then you can type var myExample:com.activetuts.examples.ExampleClass; and FlashDevelop will import the class and shorten that line to var myExample:ExampleClass;. (Of course, thanks to code completion, you only need to type var myExample:com.act«Tab».ex«Tab».Cla«Tab»;.)

FlashDevelop Automatic Imports

Our higher-level tutorials on Activetuts+ often don’t explicitly mention the import statements, since we assume that you’re using a code editor that takes care of this for you.

Automatic Class Creation

To create this com.activetuts.examples.ExampleClass class, you can right-click a folder within FlashDevelop and select Add | New Class…:

FlashDevelop Automatic Class Creation

The New Class dialog will appear:

FlashDevelop New Class dialog

You can type the desired package name into the Package field (even if the \com\activetuts\examples\ folder structure doesn’t exist) and the desired class name into the Name field. FlashDevelop will then create the folder structure (if needed) and a new AS file, ExampleClass.as [...]

Wednesday, January 5, 2011

Sketching Derivatives Applet in AS3 Flash - The Code and Custom Classes

Sketching Derivatives Applet in AS3 Flash - The Code and Custom Classes:

We present a math applet for sketching derivatives with complete AS3 source code. The applet uses a large collection of custom AS3 classes developed by the Flash and Math team over the past few years. The newest of the classes are related to an interesting drawing and smoothing technique. The user draws by dragging and shaping a curve [...]

Making a Flash game like Plants Vs Zombies – step 2

Making a Flash game like Plants Vs Zombies – step 2:

In the second part of the series, it’s time to raise money to buy a plant.

Also, we should add a smooth animation to falling suns, fix a bug which made them appear only on certain tiles and make them disappear if they aren’t picked up after a given amount of time.

Fixing the bug on newSun function

As reported by some readers, newSun function had a bug which did not allow to make the sun appear on every tile. It can be fixed assigning the x property this way:

sun.x=52+sunCol*65;

but since we are featuring smooth animation to falling sun, the entire newSun function can be changed this way:

private function newSun(e:TimerEvent):void {
 var sunRow:uint=Math.floor(Math.random()*5);
 var sunCol:uint=Math.floor(Math.random()*9);
 sun = new sunMc();
 sun.buttonMode=true;
 sunContainer.addChild(sun);
 sun.x=52+sunCol*65;
 sun.destinationY=130+sunRow*75;
 sun.y=-20;
 sun.addEventListener(MouseEvent.CLICK,sunClicked);
}

Now y property is set at -20 to make the sun appear outside the visible area, and its final y destination is saved in a variable called destinationY. We’ll see later what to do with it. Also notice the buttonMode property to make the mouse pointer change shape when it’s over the sun.

Collecting suns to raise money

First, we need a new variable to store the amount of player’s money, then we need a text field to display it somewhere. We also need Event and TextField classes to handle frame events and create on the fly text fields.

So these are the libraries we need to import in the package: [...]

Tuesday, January 4, 2011

Over $25,000 Raised For Charity: Canabalt Goes Open Source!

Over $25,000 Raised For Charity: Canabalt Goes Open Source!:

I am really excited to announce that the Canabalt source is now open and available, including the game code, Flixel for iOS, graphics, sound effects, and music:

Download Canabalt Source

More on that in a moment, however!

First I wanted to explain why we would do such a thing.  First and foremost, the holiday charity fundraising effort in which we are participating, the Indie iPhone Holiday Sale, raised over $25,000 so far for Child's Play, a wonderful organization that helps bring games and toys to children in hospitals around the world.  Let me put up the current total (as of Thursday, December 30th, 2010) in a bigger font, just for everyone's benefit:

$25,350.25

[...]

Conditionals Performance Revisited

Conditionals Performance Revisited:

Today I’m revisiting an article I wrote last August about conditionals: if-else chains, ternary (? :) operators, and switch statements. In that article I showed that if-else chains are about as fast as ternary operators and that both of them are 10-15% faster than switch statements. Today we’ll take a look at how those conditionals [...]

Four Aspects and Interpretation

Four Aspects and Interpretation:

Does instructing the player to hurry mean they’ll go faster? Would simply showing a time limit on the screen change behavior? What if the environment the avatar is in appears to be only moments from collapse?

Importantly: if the above are included, does there even need to be severe gameplay consequence for failing to go fast enough?

There are many ways that we communicate through the games we make. Among those ways are instruction, impression, interface and implementation.


Origin of the Question

Games with a Message

In a game purely for entertainment, flexibility in interpretation does not pose a problem. If everyone has fun in a different way, or imagines different details behind the play experience, that’s fine. However for a game with a planned message, understanding how the experience will be interpreted is essential to avoiding miscommunication.

Symbolism in Gameplay

I designed Alice in Bomberland, in part, to suggest through its gameplay various ways of thinking. In an effort to emulate the sort of symbolism common in children’s literature, I buried the intended meanings in the gameplay relationships, reserving the audio/visual impression for playful content. Textual instruction and in-game interface served utility only.

I tried to convey information in the implementation – in the interactions between gameplay elements – without making it explicit on the surface. Consequently, I believe that the meaning was largely lost, inaccessible until an uncommon amount of practice with the game, and even then invisible compared to the simpler, more literal forms and explanations accessible to every first-time player [...]