Flash Actionscript 101, The First ActionScript I Ever Learned

– taterboy | December 21st, 2008

Filed under: ActionScript 101, ActionScript 3, Flash, Flex, Tutorials

This is it, the very first bit of actionscript code I ever learned, besides play() and gotoAndStop() of course. The lesson went down with an experienced programmer looking over my shoulder telling me what to type. After this little app was finished, my brain hurt only understanding a few of the lines we wrote. That code was referenced and/or modified on more then a few projects that came after, each time deciphering more and applying it to new functionalities.

The original script was back in the day of AS1, but I am going to present it to you in AS3. If you are a beginner to ActionScript then it is the perfect time to learn AS3.

We are going to start really remedial for a minute and go over the basics of the classes and objects we will be using. It is kind-of long, so if you already have the basics covered, you can skip to the Application code.
Read All About It »

Technorati Tags: , , , , ,

| 5 Comments » | facebook:

A Simple Game Engine Using Random

– taterboy | December 1st, 2008

Filed under: ActionScript 3, Flash, Flex, Games, Tutorials

Using Random in Game Development, with strict guidelines, can bring some variety to game play.

This sample is not a single solution but an approached I used in developing Whacky Voting – a politically smashing game. It uses random with some strict rules to get rid of sequences that some players can easily remember, yet keeping game play consistent from one game to the next.

This demo starts with a configuration section, used to set up how we want the game to act. The engine it self could be organized a little better to be more transportable. It is commented pretty well though, so it should be easy enough to understand the approach as well as practical usage. Random is used to shuffle all of the objects that appear on screen as well as what container the objects are associated with.

We use config data for each game so that we can easily tweak game-play without hacking our code later. We can use arrays, xml or other data sources. Plan ahead and build config options into your game as it is developed.
Read All About It »

Technorati Tags: , , , , , , , , , ,

| 4 Comments » | facebook: