26th September 2009

FOTB Slides and Asobu Game Toolkit

Now that I’ve had a chance to settle down, catch up on some email, spend some time with the family, upload my photos, and blog about Flash on the Beach 2009, I will post my slides:

Presentation Slides

As usual, seeing a bunch of bullet points and diagrams doesn’t replace the thrill of watching me babble on for an hour, but it’s the best I can do unless John releases the video taken by that camera man who was in my face the whole time. :)

In there, I mentioned the game toolkit I’m working on, called Asobu, which means “to play” in Japanese. A lot of people asked me about it at the conference, and I hope I didn’t set expectations too high. I’m not trying to revolutionize the Flash gaming industry or create the next big thing that everyone uses to make games. Really all I’m trying to do is make a few reusable classes to use in my own games and make things easier for myself. But I’ll release them and if anyone else wants to use them, they’ll be free to. And hopefully a few people will say, “why the hell did you do such and such that way?” which will lead to improvements for myself and anyone else.

So what does / will Asobu consist of? First of all, it’s going to be mostly generic, architectural type stuff. There won’t be any physics engines, collision engines, 3d engines, particle systems, tile maps, isometric engines, or anything else like that. Well, a few of those things might make it in there someday, but I’m concentrating more on the things that make up the different structural parts of a game and hold them together. So far it has:

- A state machine with scenes and transitions. This is named after and loosely based on the Director class in cocos2d for iPhone. I showed some examples of this in action in the presentation, and there are some code snippets in the slides. Basically, you make each part of your game a Scene – the intro, the game itself, instructions, high score table, credits, etc. – and move between them with the Director. There are various prebuilt transitions, or you can create your own.

- A few essential UI Elements: A configurable label for displaying text, a button, and a very flexible menu system. I might extend the label to make a larger, multiline text area. In my experience, these are most of what you need to show options, settings, instructions, etc.

- A sound/music manager allowing a single point for loading/embedding sound files and playing them with various options, mute/unmute, volume, etc.

- A library/asset manager for loading/embedding and accessing external assets in one place.

- The beginnings of a level manager class for loading/embedding external level definitions. I’d also like to see if I can extend a level editor I made for a game with my Minimal Components into something generic enough to be reused on multiple projects. It would be great to have a relatively easy way to create at least a good chunk of a level editor with drag and drop of custom objects and property inspectors for them. We’ll see how that pans out.

Anyway, there is a lot of work to be done on all of this. The Director and Scenes and the UI Elements are the furthest along. Stay tuned to see more. Again, I don’t think anything here is going to amaze anyone anywhere, but what’s there already has proven helpful to me, and hopefully will be helpful to someone else too.

Post to Twitter

This entry was posted on Saturday, September 26th, 2009 at 4:50 pm and is filed under ActionScript, Conferences, Flash. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

There are currently 10 responses to “FOTB Slides and Asobu Game Toolkit”

  1. 1 On September 26th, 2009, Josh Tynjala said:

    It looks like your Director class is similar to something I built for my games that I call ScreenNavigator. You can add screens as display objects or classes, transitions are created by calling function references (which allows me to swap out different tween engines based on whichever is my favorite at any moment in time), and I can use events from each screen to wire up the navigation. An event will either display a new screen by referencing a string id, or it will call a function reference to do something else. It’s very flexible, and maybe not all that pretty, but once I had it up and running, my development of game menus sped up significantly.

  2. 2 On September 26th, 2009, kp said:

    Yeah, sounds pretty similar. :)

  3. 3 On September 27th, 2009, Prankard said:

    I looked at your slideshow. It looks really really cool.
    I understand that it isn’t “groundbreaking” stuff, in fact when it works, it’ll just work. But that’s the point.

    I work for a very small design agency, and I’ve had to make a general game menu system to re-use for a lot of games. But that’s just one menu and it isn’t very flexible at all but it’s handy for making small games.

    I’m going to suggest a couple of things (even though it’s not complete yet). Maybe for version 1.5 or something.
    I’ve been using Cocos2d this weekend and making the menu’s etc was the easyest thing to whip out. So so useful. At first I thought it was limited in the terms of the menu positioning. But then I realised I could make more menus and then re-position them. Making a complex looking main menu.
    But what I feel the menu.h is missing in Cocos2d is to justify text menus left and right. Perhaps with the flash textfield this can be done quite easily? I’m not sure.

    And finally, the sound manager class. It would be useful to have stopAndFade(timer:Number) and pauseAndFade(timer:Number) aswell.

    I made a small MP3 player that loops through tracks. And it’s so much easier to go:
    var mp3:MicroMP3Player();
    mp3.addSong(new SoundTrack1());
    mp3.addSong(new SoundTrack2());
    mp3.addSong(new SoundTrack3());
    mp3.play();

    And that sound will be managed and loop infinitely through the game. Perfect for in-game music.

    package {

    import flash.display.Stage;
    import flash.media.Sound;
    import flash.media.SoundChannel;
    import flash.events.Event;
    import flash.media.SoundTransform;

    /**
    * …
    * @author James Prankard
    * http://www.prankard.com/
    */
    public class MicroMP3Player {

    private var songs:Array = new Array();
    private var playing:Boolean = false;
    public var currentTrack = 0;
    private var constantChannel:SoundChannel;
    private static var stageInstance;

    public function MicroMP3Player() {
    }

    public function addSong(song:Sound):void {
    songs.push(song);
    }

    public function play():void {
    playing = true;
    if (songs.length>0) {
    constantChannel = songs[currentTrack].play();
    constantChannel.addEventListener(Event.SOUND_COMPLETE, waitForFinish);
    }
    }

    private function waitForFinish(e:Event):void {
    if (constantChannel != null) {
    constantChannel.removeEventListener(Event.SOUND_COMPLETE, waitForFinish);
    nextTrack();
    play();
    }
    }

    public function nextTrack() {
    currentTrack++
    if (currentTrack == songs.length) {
    currentTrack = 0;
    }
    }

    public function prevTrack() {
    currentTrack–
    if (currentTrack < 0) {
    currentTrack = songs.length-1;
    }
    }

    public function playNextTrack():void {
    nextTrack();
    stop();
    play();
    }

    public function playPrevTrack():void {
    prevTrack();
    stop();
    play();
    }

    public function stop():void {
    playing = false;
    if (constantChannel != null) {
    constantChannel.stop();
    constantChannel.removeEventListener(Event.SOUND_COMPLETE, waitForFinish);
    }
    }

    public function getPlaying():Boolean {
    return playing;
    }

    public function setVolume(volume:Number):void {
    constantChannel.soundTransform = new SoundTransform(volume, 0);
    }

    }
    }

    Anyways, really looking forward to seeing and using your framework :)

  4. 4 On September 27th, 2009, abitofcode said:

    Great presentation at FOTB this year, I’ve recently run into the ‘Game is more than a game loop’ issue. The game part was built in just under 3 days the rest of it is 3 months and counting, cocos2D is helping reduce the dev time but its still a little painful. Keeping an eye on all the retain/release business is also having the side effect that I keep falling into early optimization.
    Looking forward to next years FOTB carefully blending technology, creativity and alcohol.

  5. 5 On September 27th, 2009, leerraum said:

    do you think john will release the videos? there are no videos of FOTB08 except those teaser vids. I would be quite pleased if he would release them.

  6. 6 On September 28th, 2009, Richard Lord said:

    I so wanted to see your session, but others at the time were more relevant for work so I ended up missing you. Thanks for putting the slides up.

  7. 7 On October 1st, 2009, Lee Probert said:

    I really wanted to sit down with you to talk about the use of the Decorator pattern as a technique to create the component based entities you spoke about. Never found a good time. The last thing you’d have wanted was someone talking shop while you’re enjoying your beer. Be good to chat about it at some point though. Really enjoyed your talk. Cameraman was a bit eager though wasn’t he?

  8. 8 On October 3rd, 2009, » Notes Marc Hibbins said:

    [...] Keith Peters (site) – Casual Game Architecture: How to finish coding a game without despising it View slides [...]

  9. 9 On October 8th, 2009, Flash On the Beach 2009 | News | SupaFlash – Guillaume Tomasi said:

    [...] Keith Peters a présenté une session sur une architecture de développement de jeux. Son dernier projet "ASobu" : un toolkit pour le développement des jeux était aussi un sujet de sa présentation. (Slides de sa présentation). [...]

  10. 10 On October 25th, 2009, Flash on the Beach 09 Write Up | markstar said:

    [...] mentioned the gaming toolkits Flixel and PushButton Engine, and also announced Asobu (Keiths own toolkit). I’ve looked into using PushButton Engine for a game I’m currently [...]

Leave a Reply

Who is reading BIT-101?

Copyright ©2009 by Keith Peters. All rights reserved. This means that you may not reprint or repost the contents of this site without express written permission of the author.


  • Calendar

  • February 2010
    M T W T F S S
    « Jan    
    1234567
    891011121314
    15161718192021
    22232425262728
hoodia order buy Levitra Plus betablockers weight loss information buy pills without a prescription arthritis menopause ambien doses cat's eye health information on cholesterol cialis online order valtrex cheapest phentermine onlin e increase breast size lower blood sugar immediately terramycin which is better cialis or viagra buy cheap cialis reduce cholesterol naturally new blood pressure treatment products for back pain cheapest cialis index will levitra help piroxicam 20 mg order viagra online in germany buy tadalafil online buy levitra onlines how to naturally lower cholesterol buy generic viagra where to buy soma anti allergic drug levothyroxine dogs new hair loss treatmen buy levitra pain meds buy cheap malaria therapy weight loss after baby asthma medications chronic snoring viagra gel prostate cancer cures order viagra cialis alprazolam men health natural cure arthritis immune system support diet medicine cialis approval lipitor effects where can i buy arthritis drugs overactive bladder in men self help weight loss natural cholesterol control ativan medication cialis approval best cure for snoring breast enhancing pills order prozac celebrex pharmacy buy levitra onlines premature ejaculation cure confidence hypnotherapy free stop smoking bust enhance diet weight loss supplements skin fungal infection valium with no prescription viagra with out prescription breast enhancement products alpha blocker medications azithromycin 250mg skin disease chronic heart failure medicines dog care products buying cialis online gerd in children antibiotics to buy my drug store muscle building diet drugs affecting levitra anti anxiety medications really large breast enhancement help for constipation ulcers stomach drugs for high blood pressure selling pet products buy pain medicine viagra online overnight fucidin ointment generic zyrtec prices soft tab cialis smoking treatment dog products online weight loss solution cialis on line blue pills weight loss diet pill nitroglycerin sublingual floxin prevention of heart attack imuran order gasex vermox treatment of depression Viagra On Line buy generic cialis professional tooth whitening kits to buy valium 2mg treatment for hypertension ultram cheapest online stores hair loss products cheap weight loss diovan prescription malaria preventative taurine treating prostate cancer immune system support natural constipation cure phentermine no prescription fast delivery purchase meds without prescription buy plendil diet drug taking viagra after cialis protonix cheapest generic cialis online viagra levitra cialis yohimbe benefits muscle mass gain diet and health products medical treatment for insomnia buy blood pressure meds buy celexa levaquin interactions blood pressure drug skin disorder where can i buy arthritis drugs natural breast enhancer acute pain control online diazepam natural acne remedy antifungal strategies triphala pravachol online how can i stop smoking breast enhancement natural nautral breast enhancement beta blocker medications wellbutrin dosages order viagra cialis lower high blood pressure mass muscle phentermine from canada how to loss weight osteoporosis bone health lipitor use dog medication drug allergies buy diazepam buyviagra cialis phentermine 37.5 mg zestril medication parkinsons treatment generic revatio free nexium cosmetic dentistry tooth whitening avalide generic buy cheap tadalafil uk simvastatin tablets buy cialis online in usa breast pain cat care ovulating clomid medical skin care lines viagra to canada viagra or cialis cheap cialis tramadole buy azulfidine drugs used for cancer ear pain oral ketoconazole raloxifene evista taurine sex with levitra stop smoking today heart failure natural cholesterol control protonix dose oxybutynin 5mg irritable bowel syndrome treatments new treatment for hepatitis c cheap prescription drugs viagra online prescription depression therapy buy sumycin menopause treatment hair loss treatments medication pletal what is a natural antibiotic viagra purchase synthroid tablets generic prilosec lipitor cat health info discount vitamin cholesterol and health bacterial diarrhea weight loss medicine new treatment for depression removing retention fluids diuretic medicines soma 250mg cat anxiety loss weight online pharmacy viagra buy phentermine without a prescription herbs for breast growth cymbalta dosage fast weight loss supplement arthritis menopause levitra online order cheapest place to buy phentermine cold flu medications for nausea buy ultram where pills for acne free weight loss programs help with anxiety improve skin valium 2mg urinary tract health cat urinary tract disease crestor dosage drug zofran calan zyrtec buy nirdosh dosage digoxin buy pain patch acomplia alendronate cialis best price cheap wellbutrin small dog products depression medicine sildenafil dosage dog health depression and anxiety lamictal withdrawal viagra, levitra and cialis online drug buy bone maker strontium cures for hair loss nitroglycerin tablets natural arthritis treatment arimidex buy buy energy patch how to treat a yeast infection viagra herb alternative viagra cialis levitra order sublingual cialis cialis comparison breast lift augmentation seroquel for depression carisoprodol mg new treatment for depression cialis soft tabs safe sleep aid severe leg muscle pain natural weight loss gabapentin medication what is ambien clozapine medication viagra online ordering cures for hair loss free weight loss help buy viagra levitra pet treats order plan b diabetes type 2 phentermine risk ultram er side effects treatment for hepatitis b constipation cures drugs used in treating depression leg pain buy cheap generic cialis anti anxiety meds hypnotherapy for weight loss motilium body building fitness dog skin relieve upper back pain cures for high blood pressure cardura celecoxib Viagra Online Cheap cheap bactrim ambien online lamisil cost infertility meds progesterone clomid osteoporosis hormon urinary tract infection symptoms hypnotherapy for health how to buy viagra online joint pain cure online allegra buy generic cialis uk generic abilify cures for lung cancer new treatments for lung diseases pain meds buy cheap treatment for dry skin disease of the skin nexium drug free stop smoking buy tooth whitening products viagra tablet naprosyn dosage women's fertility male sexual power carisoprodol purchase asthma attack treatment estradiol pills phentermine from canada pet health care hair loss products online astelin generic cheap estrace free weight loss program buy rimonabant relieve lower back pain lexapro prescription new breast cancer drug buying ambien best online viagra scams home scabies treatment hair loss in woman buy generic cialis uk eye drop gabapentin medication amitriptyline uses ultram no prescription natural pain cures buy cla products back pain lowest price generic viagra pain meds buy cheap mg buy phentermine acne skin care cialis rx weight loss and fitness nitrofurantoin buy phentermine without a prescription high blood pressure medicines stop hair loss viagra china use levitra female health coreg dosage carisoprodol price pain relief product breast enlargement depression pills buy how to treat flu home neck pain relief order imitrex online vitamin b-6 cialis soft tabs pharmacy software description of soma buy isoniazid cheap prevacid help ear infections on dog fat burning stop smoking remedies rhinitis treatment chronic pain relief birth control online meds without prescriptions buy lovastatin drug stores penis enlargement without pill cancer medicine buy deltasone cure for throat infection thyroid dogs dosage cipro viagra from uk cheap alcoholism treatment natural cure for constipation paxil cialis 5mg tablets amitriptyline uses topamax drugs lower heart rate drug discount codes dog medicines body fat loss joint pain recurring urinary tract infections ativan information buy drugs online cheap fast valium body building ambien maximum dosage information on valium how to sperm more chlamydia medication dosage buy cialis online viagra chest pain heart fluconazole interaction calcium channel blocker side effects zolpidem dosage online drug stores zelnorm muscle strength fluconazole buy stress gum free weight loss products information on gout low immune system online viagra cialis 20 buy cefixime phentermine from canada gain muscle mass fast lasix side effects buy singulair penis enlargement free natural muscle and joint health viagra online overnight cialis online aceon allergies and asthma diamox side effects weight loss software generic compazine price for tramadol high blood pressure symtoms osteoporosis help treatment severe constipation drug new smoking stop pain relief product xanax online dog health info clonazepam .5mg buy tribulus pregnancy prevention methods allergy hives