Zombie Killer Gorefest 3 - Flash Game

Date: 2nd April 2009 at 8:58 pm | Filed under: blog, flash, portfolio | Author: Sam Burdge | Tags: , , , ,

zombie killer gorefest 3

I have been working on a couple of Flash games recently for my new arcade site zapgamez.com. The first of these games is Zombie Killer Gorefest 3, which is now previewing on Zap Gamez. You can play the game here:
http://www.zapgamez.com/games/action/zombie-killer-gorefest-3

The official release text for the game is as follows:

Currently exclusive to ZapGamez.com, Zombie Killer Gorefest 3 is a point and click shoot 'em up where you have to defeat the zombie hordes in 3 chilling action-packed levels. Inspired by 70's and 80's Horror and B-Movie genres, this game includes it's fair share of blood and gore, so is therefore not appropriate for younger players.

I created the game in actionscript 2, possibly one of my last as2 projects before I move over to as3 fully. The graphics and animation are a more prominent part of the game than the scripted aspects which are fairly basic hitTest functions.

The game will probably stay exclusive to Zap for the next couple of weeks before I release it through MochiAds distribution. If you are interested in getting the game for your site when it is released please subscribe to my RSS feed and I will announce the release here on my blog in the near future.

Leave a Comment

Flash Audio - Sound Visualisation & New Audio API

Date: 27th January 2009 at 11:37 pm | Filed under: development, flash | Author: Sam Burdge | Tags: , , ,

INSPIRATION

A long time ago I remember being inspired by the Dub Selector project at Infinite Wheel, a series of Flash movies that play heavy dub reggae loops, and incorporate various ways of triggering a selection of dub sound effects, drum rolls and keyboard notes. The project gave me the idea to create a more in-depth Flash music production tool, with many preset sounds and loops, and potentially audio sequencing tools too.

Dub SelectorDub SelectorDub Selector

MY PREVIOUS EXPERIMENTS WITH FLASH AND SOUND

This was back in the days of Flash 5 and I was a novice with Flash, I had only a basic grasp of actionscript. My first experiment was called ATG Beatbox. Here it is in all it's lo-fi glory!

Pretty basic,  but quite fun to play with too! The main problem I had was getting the samples to loop properly, and to get 2 or more samples to play in sync with each other. These restrictions made the possibility of sequencing very limited, so I ended up creating it so that the user could trigger the samples manually and had to time it right to get the 2 beats in sync.

The only way I could get the samples to loop cleanly was by importing them into the fla and attaching them to keyframes in the timeline.

I later made a few other experiments, such as a piano arpeggiator which used actionscript to play different arpeggio patterns. The timing was always an issue, and I concluded that Flash makes a lousy metronome! Unfortunately I seem to have lost the source files for this project :( so I can't provide an example.

Other more recent Flash projects I have done which include an element of sound are the SoundFX Player and Artanoid Game for 76 Creative. Artanoid uses the as2 attachSound method to load the mp3 files dynamically from the server.

SOUND VISUALISATION

New to actionscript 3 is the SoundMixer.computeSpectrum method, which takes a snapshot of the current sound wave and places it into the specified ByteArray object. The values are formatted as normalized floating-point values, in the range -1.0 to 1.0. The ByteArray object passed to the outputArray parameter is overwritten with the new values. The size of the ByteArray object created is fixed to 512 floating-point values, where the first 256 values represent the left audio channel, and the second 256 values represent the right audio channel.

It is explained in more depth in the article Sound Visualization in Flash CS3 by Tom Green, which is where I found out about it in the first place.

This is something I'm still experimenting with, but here's a basic example of what it can do:

Notice that because the audio sample is being loaded from the server using the Sound.load() method, the looping of the sample is still not satisfactory. The only way to make a sample loop properly still seems to be to import it and attach it to a keyframe. Here's another more abstract example:

There are a lot more cool examples of this type of Sound Visualisation at the AS3 Sound Spectrum Contest Results Be sure to check out the winning entry, which really demonstrates the scope of what can be done using computeSpectrum.

NEW SOUND API FOR FLASH 10

I recently discovered the Hobnox AudioTool, which is exactly the type of Flash based audio tool I imagined. It's actually amazing! As it features effects, like distortion, delay & reverb, phaser, etc. I could tell that, although the interface was flash, something else was being used to process the audio. The other thing I noticed was that the timing of it's drum machines was perfect! Something I've never been able to achieve with Flash.

Further investigation of the new sound API led me to these three articles by Adobe Engineer Tinic Uro, which seem to be a direct response to the Adobe, Make Some Noise campaign:

In Part 3 of the article he provides some code for a 'seamless loop' using the new extract() method with the samplesCallback event handler. I will put this code to the test as I am sure it will lead to new projects and experiments for me, the results of which will surely appear on my site in the near future!

Other Flash projects that utilise the new sound API are Tenoran, a sampling and basic sequencing instrument, and Noteflight, a a full-featured application that displays, edits, prints and plays back music notation.

Leave a Comment

Leona Naess animated logo and holding page

Date: 15th August 2008 at 10:19 am | Filed under: flash, portfolio | Author: Sam Burdge

This holding page built for Polydor artist, singer / songwriter Leona Naess features an animated logo with random fades and glows. The flash random timing actionscript is something I have utilised in the past to create similar effects (see: ).

The holding page also features a streaming mp3 (using flash), mailing list signup form with javascript validation embedded youtube video and google analytics.

Check it out:

www.leonanaess.com

Leave a Comment

Flash - random motion and rotation - Actionscript 2

Date: 9th April 2008 at 11:32 am | Filed under: actionscript, development, flash | Author: Sam Burdge

Back again, my pet tadpoles (they still haven't grown into frogs yet!). This time I am going to explain the actionscript that makes them move, turn and run from the mouse. Firstly, heres an example of what they do (move your mouse over them and watch 'em swim away): Read on…

11 Responses to “Flash - random motion and rotation - Actionscript 2”

  • Comment by Sherry
    Date: April 9th, 2008 at 5:14 pm

    This is very cool, thank you for sharing. I can't wait to try it :-)

  • Comment by sherry
    Date: April 10th, 2008 at 8:55 pm

    Hi, I tried this out and am having trouble getting it to work. Am I supposed to have 2 different layers, one for tadpole and one for mouse_mc? Also, my transparent pixels don't seem to be attached to my mouse…

  • Comment by Sam Burdge
    Date: April 12th, 2008 at 11:04 pm

    Hi Sherry

    They can be on separate layers, or both the same layer, it shouldn’t matter. Did you give the movie clips instance names in the ‘properties’ panel?

    Sam

  • Comment by bex
    Date: August 12th, 2008 at 2:10 pm

    Hi there, just wondering if you’d have an tips on converting this to AS3. I’m very new to Flash and have been trying to do it all day!

    Thanks in advance,

    bex.

  • Comment by ds
    Date: April 7th, 2009 at 4:18 am

    very nice !!!!!!!!!!

  • Comment by gray
    Date: April 23rd, 2009 at 7:32 am

    Hi, I know this is a little late in the game and not sure if anyone is still answering questions but…

    What I’m looking to do is have the sprite (tadpole) freeze on mouse over; basically a button, and resume it’s motion on rollout.

    Any help is appreciated.

    Thanks,
    Gray

  • Comment by VIEZZZZ
    Date: May 26th, 2009 at 7:36 am

    i tried it and it worked! tnx
    BUT i dont understand something. The tadpoles move quite smooth with an “ease out” first of all this looks nice but i dont understand why it moves like that. Second thing is… How can i also make an “ease in” So that they start moving slowly, then get to speed, then slow down en eventually stop… ?? can anyone help??

  • Comment by Sam Burdge
    Date: May 26th, 2009 at 12:01 pm

    the function called newpos() basically does the following:

    1. choose a rondom point on the stage
    2. rotate to face the direction of that point
    3. Move toward the point while decelerating to a stop
    4. Once it is not moving repeat the process

    @gray

    to stop them moving try changing:

    if(this.hitTest(_root.mouse_mc)){ this.newpos();}

    to:

    if(this.hitTest(_root.mouse_mc)){
    this._x = this._x;
    this._y = this._y;
    }

    @viezzz
    sorry i don’t have time to code it and test it at the moment, but you need to look at these lines of code:

    this._x += dx/acceleration;
    this._y += dy/acceleration;

    this is the code for the deceleration.

    My idea would be to calculate a halfway point between the start and end position and make the tadpole accelerate towards the halfway point, and then deccelerate away from it.

    Hope this helps!

  • Comment by Max
    Date: November 23rd, 2009 at 2:51 pm

    where can i get copy of whole script?

  • Comment by pete
    Date: February 1st, 2010 at 5:40 pm

    Hi.. nice work. I wanted to increase the acceleration value, but the motion stops after a while if a higher value is used.
    I just don’t get it why? maybe someone can give me a hint ;)

  • Comment by Zon
    Date: June 19th, 2010 at 2:43 am

    Sweet little function man, cheers for the explanation!

Leave a Comment

random timing and color actionscripts

Date: 19th October 2007 at 1:45 am | Filed under: actionscript, development | Author: Sam Burdge

Here are the actionscripts used in the {{post id="flash-mousetrails-with-random-flashes" text="example" target="_self"}} swf. First the random timing script:

Read on…

Leave a Comment