Posts

Showing posts from 2010

Game performance benchmark BunnyMark ported to HTML5!

Image
BunnyMark is the benchmark that's taking the world by storm! Just to prove that javascript is easy and a wittle baby language I have ported BunnyMark to HTML5 . Results confirm that HTML5 really is one better than HTML4. Lightning fast with 3000 bunnies in Chrome, Firefox4, horrible in Firefox 3, non existant in IE678. Click here to view , source is on "view source". Other browser users (IE9, Safari, Opera) please report performance in the comments. Don't miss the Windows Phone 7 and Flash versions, and BunnyLandMark for Flash, which I haven't got round to porting yet.

Windows Phone 7 for Flash Developers, Part 2 - BunnyMark benchmark in XNA

Image
To get an idea of what’s possible in terms of 2D games on Windows Phone 7, I have ported my BunnyMark benchmark from AS3/Flash to C#/XNA. The results were very decent for a small device. I could render 3500 bunnies without any slowdown, which is equivalent to what I could do with Bitmaps in Flash on my dual core PC laptop, and about 10 times as many bunnies as Flash on Android could handle. The reason for this great performance, of course is that XNA is hardware accelerated while Flash is not... until next year at least. Here is the source code - watch the video below to see it in action (shot on non-HD camera, so not great quality I'm afraid). XNA splits game updates (equivalent to ENTER_FRAME event in Flash) into 2 separate functions which you override. There is “Update” (confusingly, functions in C# start with capital letters) where you put all the update logic for your game, and there is “Draw”, where you put all the rendering logic. Like copyPixels blitting in AS3, nothi

BunnyLandMark - a new Flash game benchmark

Image
I learned a lot about Flash rendering with my BunnyMark benchmark, but I felt it was missing a few vital features that would make it a true test of game-specific performance. So I've come up with a brand new test: BunnyLandMark! Once again I created a version using display list Bitmaps, and a version using copyPixels blitting. Here are the new features: a large scrolling world - about 4000x4000 pixels. I chose this size as it is roughly the biggest bitmap you can make in Flash player 10. With a bit more work it is possible to make infinitely large worlds, but this size was big enough for my purposes. Perspective depth-sorting. Bunnies that are further into the scene are sorted to appear behind those that are closer to the viewer. More bunnies - as off-screen bunnies don't need to be drawn, the total number of bunnies can be increased. And here are the results (INSTRUCTIONS: use ARROW KEYS or WASD to scroll!) The blitting demo can handle 90,000 total bunnies at 30fps, with a

Windows Phone 7 for Flash Developers, Part 1

Image
As I write this I am in possession of a Windows Phone 7 developer handset, the problem is I don't know quite what to do with it yet. I think WP7 seems like a well thought-out platform, hence my interest in developing for it, but as a completely new technology, it's hard to know exactly what the best strategy for app and game development is. Here are some random facts and thoughts about the platform. (Since I first posted this, Mike Ormond from Microsoft has emailed me with some more definitive answers, so I have updated the post to reflect this). Let's get the bad news out of the way first: there is currently no support for 3rd party tools like Adobe AIR and Unity3D. Although Mike says "there will almost certainly be support for 3rd party tools" in the future, he couldn't give any specifics about what those might be, and as always with these things, it's impossible to know whose court the ball is in. The phone's browser works well, but doesn't sup

Display list vs. blitting - the results!

Image
To get some actual evidence for my opinions on the joys of the Flash display list , I created two demos that I'm calling "BunnyMark", a test of rendering small bouncing bunny pngs with alpha transparency. Since first posting, lots of readers helped by testing on different browsers and operating systems, and I have updated this post with their results. The results were quite interesting, and not quite what I expected. Blitting was really fast, although actually a little bit slower than I expected, but gave a consistent rendering speed across all platforms. Bitmaps were also pretty fast, although in Safari on Mac performed really badly. I emailed Tinic from the Flash player team about this issue, and he has said he will look into it. Ok so here are the results: The display list demo could render 4000 bunnies at 30 fps on my PC without slowing down. This was replicated by readers on all Mac and Windows browsers except for Mac Safari, where it was down to 10-20 fps. Based

In defense of MovieClips, Sprites and the display list (...the case against blitting?)

UPDATE: I have made some benchmarks, and the results are in ! Original post: “This is why I always run a raster pipeline. The DisplayObject API is a trick played on the gullible and the trusting…” — @bengarney Ben Garney is a very smart game/engine developer with a background in C++ and known for developing the Torque engine, who has now moved into the Flash world with Pushbutton Engine and games like Social City. I come from the complete opposite direction. I’m a Flash guy with a background in quick turn-around, design driven creative Flash projects, who now focuses on game development. This difference in backgrounds, and dare I say *ideologies* is why I thought I should write a response to Ben’s recent post about blitting , and stick up for the display list a bit. If you haven’t read Ben’s article, I suggest you go do that, but for the sake of clarification, blitting is basically using copyPixels to manually draw your graphics to a single bitmap data object that you display via a s

AdvancED Game Design with Flash – Book Review

Lovely, lovely Friends of ED were kind enough to send me a copy of AdvancED Game Design with Flash by Rex Van Der Spuy. Just because they gave me free stuff, it doesn’t mean I’m going to give this book an easy ride though! This book has lots of good things and a few not so good things, as I will describe. Let’s start by getting one thing out of the way – this book has almost nothing to do with game design. There is no mention of game design (as I understand the term) until Chapter 7, where Rex gives a few pages of good advice. The other 700 or so pages of the book are about game programming/development/architecture. (To be clear, my understanding of "game design" is: deciding what happens in your game and tuning the game mechanics to make them fun ). The best thing about this book is that it is very comprehensive, covering pretty much every hurdle you will meet when building a Flash game, including an extensive looks at collision detection, which is probably one of the harde

Cornwall Digital Meetup - Wednesday 20th October 2010

Image
Another shout-out for people in Cornwall - do not miss the first meeting of Cornwall digital meetup group on Wednesday 20th October 2010 at Blue Bar in Porthtowan, details are at: http://www.meetup.com/Cornwall-Digital/

Games meetup in Plymouth: 1st of November 2010

Image
( Some rights reserved by Steve Lavelle ) Ok this is a pretty niche post, so as soon as you answer no to any of these criteria, you can happily stop reading! If you live in Devon or Cornwall, and are into game design, development, art, music, interactivity or any other related field you can now hang out with kindred spirits, have a beer and get excited about making games. There is a new monthly meetup in Plymouth starting 1st of November 2010. The guys from the awesome Mutant Labs and Remode studios will be there, so will Korash who organises the Extended Play games festival, along with a bunch of students and of course me! You can sign up to it on Facebook http://www.facebook.com/event.php?eid=109217385808574 - or if you hate facebook that much, just email me and I'll send you the details when they are finalised. If you live in Cornwall I will be driving up so I can even give 4 people a lift. You now have no excuse not to go!

Flash on the Beach 2010 – This guy’s experience.

Image
I’m writing this on the train home from Flash on the Beach . I should probably be coding a game like I did on the way to the conference , but I’m finding that after sensory overload from 3 days of sessions, a few late nights and the terror of doing two(!) sessions on stage, my brain is unable to do code right now. My main session seemed to go very well, although I’m gutted for all the people who couldn’t get in because it was so packed. The demos from the session are already available at DullDudeGames.com/game-designer and I’m going to add a transcript of what I said and my slides very shortly. If you were an attendee there should be a video at some point, although I didn’t see any cameras so maybe it’s just a screen cast or something. It was my first full session at a big conference, and definitely an item ticked on my bucket list. I’m mega grateful to conference organiser John Davey for putting me up there, and Pokemon Trainer Seb-Lee Delisle for being my hype-man for the last 2 y

No Sleep Till Brighton

Image
Ok , so. It's the week before Flash on the Beach 2010, which is my first full speaking engagement at a major conference, and I have a nice mix of excitement and dread. My talk, "Zero to Game Designer in 60 Minutes" is all written, and I've got 8 specially created interactive examples demonstrating different gameplay mechanics. Each demo has an avatar you can control, and a load of sliders and switches you can use to change variables and turn on and off different mechanics. If you're coming along, and you bring your laptop , you can actually play along with the demos while I show them, which should make the session even more fun. And if you're not going, or you don't have a laptop, don't worry, because I'm going to put all the demos online from the minute my talk finishes. See you in Brighton, or watch this space for the online release .

Thoughts on re-skinning games

I just received an email from a Flash developer who reads my blog and wanted some advice about creating a pinball game. He wrote that he doesn't have much experience making games, and he's been given a really tight deadline, so should he try and find an existing game to reskin, or should he develop the game from scratch? So reader, this is my advice: Firstly, don't even think about grabbing a game from a portal and decompiling it. It's immoral and it's illegal. One idea might be to go to http://www.flashgamelicense.com/ or https://www.mochimedia.com/ and search for pinball games. You can then contact the developers and ask them if they'd like to reskin their game for you or supply the source files so you can do it yourself. This option may actually work out much more profitable than developing the game yourself. If you do a google search for "flash game source code" you will find there are many companies selling source code for Flash games, often at

Flash on the Beach 2010 schedule picks

Everyone seems to be posting what they're looking forward to seeing, here's mine: Monday: KEYNOTE GRANT SKINNER - ADHD FTW, LOL!!! (although would also have loved to see Conrad's Signals/Robotlegs talk) ANDRE MICHELLE - PULSATILE CRACKLE MARIO KLINGEMANN - SO LONG, AND THANKS FOR ALL THE FLASH (Mario's last conference session for a few years apparently) HOSS GIFFORD - THINGS I HAVE LEARNED. ROBERT HODGIN - PRACTICE MAKES PERFECT, SO WHAT ARE YOU PRACTICING? STEFAN SAGMEISTER - DESIGN AND HAPPINESS Tuesday: THE ELEVATOR PITCH (I did it last year and it was loads of fun. This year look out for my buddies Jasper Stocker and Andreas Ronning) JON HOWARD - WHERE IN THE WORLD? INTERCONTINENTAL BALLISTIC FLASH JOA EBERT - 1 1 7 11 21 SEB LEE-DELISLE - WHAT THE FLUX!? (the only talk capable of sparking a Flame-war!) JULIEN VALLÉE - STORYTELLING, PLAYFULNESS AND EXPERIMENTATION NANDO COSTA - THE OTHER SIDE BRENDAN DAWES - MAKERS OF THINGS Wednesday: 6 OF THE BEST

Indie Flash Games 101

My buddy Adam, who has just started teaching interactive media at university in Denmark, emailed me some questions about how to get his students started with publishing their own indie Flash games. These days I can't write anything without making it into a blog post, so here's my getting started guide: What technical issues should students be aware of? - You need both a copy of Flash Professional (CS3, 4, or 5) AND a code editor . If you are on Windows download FlashDevelop - it's free . Otherwise try FDT, InteliJ IDEa or FlashBuilder, which all have free/cheap options for students/beginners. - Use ActionScript3, Flash player 9 or 10. -If you are confident with programming and want to make more advanced games in a short space of time, consider using Flixel or Box2D . - Filesize should be less than 8MB - Dimensions should be width: 400-720 pixels, height: 300-600 pixels. - Game should be a single self-contained swf file. What are the top sites to submit a game to, a

Understanding Game Time Steps - Your 3 Options

I was just answering a question over at the gamedev Stack Exchange beta site and I realised I was pretty much writing a blog post about time steps for games. How you handle your time step has big implications on how your game architecture needs to be set up. There's a lot of confusion and misinformation in this space, but I think I've pretty much got my head around it. Here are your 3 options: Option 1 - Do Nothing Do nothing. Attempt to update and render at a certain interval, e.g. 30 times per second. If it falls behind, let it and don't worry. The game will slow down into jerky slow motion if the CPU can't keep up with your game, but there will be no jarring jumps across the screen. This option won't work at all for real-time multi-user games, but is fine for single player games and has been used successfully in many games. Option 2 - Delta Time Use the delta time between each update to vary the movement of objects. In Flash this is just a matter of callin

A code review of PewPew by Mike Chambers

Image
A very rare event has occurred - the chance to look at, discuss and play with the full source for a Flash game! I've worked with the source to dozens of games by different developers, but I'm normally under a non-disclosure agreement so I cannot divulge the full horrors of what I found there. But Mike Chambers from Adobe has kindly released the full source to his game under MIT open source license, and I thought this could be a great spring-board to open up discussion on the architecture and best practice of making Flash games. The source is here: http://github.com/mikechambers/pewpew/archives/master but you also need to download is framework from here: http://github.com/mikechambers/Simple-Game-Framework/archives/master Mike, hasn't made a game since Flash 4, so if you read this Mike, please take it in the scholarly spirit in which it is intended :) and to everyone else, remember I am just one guy with some strong opinions, weakly held. Ok here's my thoughts...

Goals, missions and quests

Games with little in the way of narrative tend to have quite abstract goals for the player to aim for. I've written before that "games are about the relationships between objects in space", and in a pure game like Tetris or Connect 4, the goal is simply to get some objects into a particular spatial relationship, for example a straight line. Most action/adventure games however, use three basic goals : Kill enemies (like Space Invaders) Collect items (like Pacman) Reach Location (like Mario - although he also collects items and kills enemies) Even a game like Gears of War is basically made up of just these goals - get to the extraction point while picking up weapons and ammo and killing locusts. But that's not what makes GoW exciting or fun - it's the obstacles that get in your way - environmental puzzles to solve, enemy behaviour to study and overcome, and the twitch skill you need to survive. The problem with RPG quests, like you find in World of Warcraft, is th

Some thoughts on character design

Some random things I remember reading about character design, and some things that have worked for me. Thomas the Tank Engine breaks both my first two rules, so should be an example of the bad character design, but somehow kids love it! a character should be recognisable from just their silhouette. Each character in a group should have their own colour scheme. Simply-drawn characters are easier for the player/viewer/reader to relate to, because they are less specifically one person, and more of a vessel for the player to project themselves onto. For the same reason as above, characters shouldn't say much - that's the Gordon Freeman effect. Most game characters don't talk, and when they do talk, on spin-off cartoons etc (e.g. Sonic), it's annoying. In games you can express a lot about the character from the way they move and interact with the environment. For unique costumes, raid the history books for crazy armour, uniforms, hats and dresses, and adapt to fit your sett

Now I have a games portal too! (DullDudeGames.com)

Image
Now I have a portal . There are a lot of Flash games portals out there. Maybe a million, maybe a billion; who can say? And does the world need another one? Probably not. So why have I made one? (OK, enough rhetorical questions now!) In case you don't know, a summary of how the indie Flash games business works is this: - Developer makes a game - Developer licenses game to a primary sponsor and adds branding and links back to sponsor site within the game. - Sponsor pays developer, and as long as developer didn't spend too long making the game, developer makes a profit. - Sponsor sells advertising on their site. The advertising (hopefully) generates more revenue than the sponsor paid for the game, so they make a profit. If you create a game, but don't have a sponsor, you have some surplus value, which is the traffic your game could generate, that doesn't go anywhere. So make your own portal and put some ads on it! Which is what I've done, because I didn't

Unity Game Development Essentials - Book Review

Image
The publishers of Unity Game Development Essentials , Packt, were kind enough to send me a review copy of the book at the end of last year, but I have been so stupidly busy I didn't have much time to read the book let alone post my review. I had originally planned to only read the book while sat in front of Unity so that I could work along with the tutorials, but again time got me so I ended up just reading it on the train. As it turned out this didn't actually cause any problems, and I managed to turn an unproductive commute into some very productive learning time. The book is basically one long tutorial that shows you how to make a tropical island, set up a first-person camera to walk around it, and create some interaction with the environment, such as collecting objects, opening doors and (don't ask me why) throwing coconuts. Between this book, Unity3d.com's tropical paradise demo and Offroad Velociraptor Safari, you will be forgiven for thinking Unity can only mak

Gamepad ported to Processing / JAVA

Image
Gamepad , my opensource keyboard input utility, has received a great reaction so far, with many retweets, over 1000 views, and some great partnerships with other libraries in the pipeline. And now it's not just for Flash, because Michael Heuer has ported the whole project to JAVA for use with processing. So, if that's how you get down, go check out Gamepad for Processing on Github . Big thanks to Michael for taking the time to create this.

Geometry Wars in 25 lines of ActionScript source code

Image
I recently noticed that Keith Peters' 25 lines competition and all the entries have been purged from the internet, so in case you missed it first time, here's my port of a Geometry Wars style game, with source code below. Click to view . Here's the source, under free for commercial or non-commercial use MIT license. It gets cut off quite badly by blogger, so you're better off just clicking here to download. To run, just paste it into the timeline of CS4/CS5. I know that's a bad way to do things, but it was the rules of the original competition. If someone wants to make the necessary tweaks to compile it under the Flex compiler, I'd be very happy to post their code. Enjoy! /** * 25-Line ActionScript Contest Entry * * Project: Trigonometry Wars * Author: Iain Lobb - iainlobb@googlemail.com * Date: 27 NOVEMBER 08 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the &quo