Archive for the ‘Game programming’ Category

2 days of Papervision3D and Flash games training for £249!

Tuesday, June 8th, 2010

Depth of Field particles in Papervision3D

I’m very pleased to announce that I’m running 2 days of training in Birmingham (UK) at the end of July, along with my friends at FlashMidlands. And if you book the Super Early Bird tickets (before June 15th), you’ll get both days for only £249! (saving £180 from the full price!) But I’d hurry, these courses usually sell out.

I’ll show you how to get started with Papervision3D and before you know it, you’ll be working with models, texture baking, depth of field particle effects (see image above) and of course, FLARToolkit using SimplAR. I’ll also be revealing many of the optimisation and production techniques behind high quality Papervision3D projects.

Asteroids from seb.ly

On the second day we’re going to look at making Flash games and programming animation, especially concentrating on interactivity, optimisation and making the games feel just right. And you’ll take away the base code for Space Invaders, Asteroids, a top down driving game, 3D soccer shootout, a platform game engine, a simple framework and more!

Naturally I’d encourage you to come to both days, but of course you are free to choose a single day if you prefer. The last course I ran in Brighton got a 97.78% approval rating and you can read more feedback here.

There are very limited super early bird tickets available (only 8) so book now to ensure your space!

More training courses in Cologne, Minneapolis, New York and San Francisco

Wednesday, February 10th, 2010

I’ve just finished my Brighton training courses which were seriously good fun, and everyone seemed to enjoy themselves, I’ve certainly got excellent feedback so far!

My next training course is short notice; it’ll be a Papervision course in San Francisco on the 9th March particularly aimed at 3D games. It’ll coincide with the Flash games summit so if you’re interested, let me know and I’ll make sure to get in touch with more information as I have it.

Then it’s on to Cologne for FFK in April, where I’m running both a Papervision3D course and a Flash games training course! More info on the FFK website.

And back to NYC for Flash and the City in May, and I’ll be running courses around the conference. Again, mail me if you’re interested and I’ll send you the details as they are announced.

And finally in FlashBelt in June, I’ll be teaching a one day Flash games workshop. Teaching you maths by stealth – who knew that you could learn trigonometry from Asteroids and vector maths from platform games? :-) It’s a fantastic conference and I’m really looking forward to coming back for my fourth year in a row!

Can’t make any of these events? Then help me organise one near you! Mail me.

Multi-user gaming in Flash – Lunar Lander tests

Sunday, January 17th, 2010

Lunar Lander multi-user tests

Anyone playing my Lunar Lander game won’t know it, but we’re spying on them! The game gets around 20,000 hits a month, which is very roughly one a minute or so, so I thought it’d be the perfect vehicle to test out some real-time gaming techniques.

I’ve replaced the original game with one that transmits your position to ElectroServer, although you won’t notice any difference at all. The only way to see the all the current players is via the swf below :
(more…)

Predictive collision detection techniques

Saturday, January 9th, 2010

IMG_8165

In preparation for my upcoming Flash game programming training courses, I’m getting my head back into game physics, and I so I thought I’d share some useful collision detection methods I’ve discovered over the last few years.

Reactive collision detection

Collision detection in Flash games often occurs after things have moved. So you have a circle (usually a 2D representation of a ball) and you’re moving it towards a vertical line on the side of the screen (representing a wall). Every frame, you update its position and check whether it’s overlapping the wall.

Which is great, but of course if the ball is moving fast it may go from one side of the wall all the way to the other side between frames and no collision is detected. One way to get around this is to split up the movement of the ball into small segments and run this check several times between frames. This seems pretty inelegant to me so I have always strived to use predictive collision detection methods where my maths knowledge has allowed me! (This is also known as sweep testing, frame independent or continuous collision detection (CCD)).

Predicting when things will collide before you move them

So rather than just check whether the ball is intersecting with the wall between renders, we actually check the velocity of the ball to see at what point in time it would hit the wall if it continued in the direction it’s going.
(more…)

Learn how to program Flash games

Saturday, December 12th, 2009

I’ve just set up a brand new 2 day training course to teach you everything I know about making Flash games! It’s in Brighton (of course) on the 8th and 9th of February (the week after the Papervision training).

Flash games programming training

We’ll be covering all the fun stuff, collisions, physics, optimisation, actionscript animation and working with graphical assets and sound. I’ve just put the first draft of the itinerary together and I’m really excited about it – it’s all of my very favourite things about programming ActionScript. :-)

Flash games programming training

And of course we’ll be using my portfolio of games as case studies, including Jambuster (BBC), Extreme Pamplona (Sure for Men), The Simple Game (Philips) and we’ll even be diving into the code for LunarLander3D in detail.

Early bird pricing is only £250 for 2 days and there are 4 student places, so please book early to ensure your space.

Flash Games Programming in Brighton information and booking.

Lunar Lander 3D in 5K

Saturday, April 25th, 2009

Remember Lunar Lander? One of the very first arcade games ever? Well, actually, if I’m honest I don’t really remember it when it came out in 1979 (I was only 7 at the time), but I do think it’s a very, very cool game.

lunarlander original

For starters, the display didn’t use scan lines like a normal telly, instead, the cathode ray moves around to make shapes, the same way that laseriums used to make pictures with lasers. (If you don’t remember the 80s you’ll probably have no idea what I’m talking about).

Secondly, it’s actually very, very difficult. So you feel a real sense of achievement when you actually land the thing safely! I was actually lucky enough to see an original vector based arcade cabinet, and the thing that immediately strikes you is how bright the screen is, and how beautiful those glowing lines are.

Sadly, Lunar Lander had a fairly limited life when it came out. It was quickly superceded by perhaps the most famous vector game ever, Asteroids. In fact most of the early Lunar Landers had their insides unceremoniously ripped out and were converted to Asteroids cabinets, so they’re pretty rare now.

A few years ago, as a tribute to the early pioneers of arcade gaming, I decided to recreate Lunar Lander in Flash, with painstaking attention to detail and accuracy! And what did I do to celebrate this great achievement? Did I shout about it from the rooftops? Did I post it on the internet for everyone to share and enjoy? Did I write a blog post about it? Well actually no, I just sat on it and it’s been laying there burning a hole on my hard drive all this time.

My flash Lunar Lander

My flash Lunar Lander

But don’t worry, you can now play this online here to your heart’s content. Use left and right arrows, and up arrow to thrust. It’ll take a little effort to get used to, but that’s half the joy. :-)

But that’s not what this post is about. A local Brighton geek group, £5App decided to run a 5KApp competition, where you could submit any program that was 5120 bytes or less. And you were allowed to use Flash, so I got going to see how if I could make a Lunar Lander clone within the file size limit.

I’d worked out how to use Perlin noise to create a 2D landscape and got pretty much all of the physics and collision detection working, but I’d only used about 3K.

So to make it a bit more interesting, I decided to add 3D! To create the landscape I used the same Perlin noise image to store all the data, and drew the landscape in strips from back to front, with a very basic 3D to 2D formula, and before I knew it I had 3D Lunar Lander!

Lunar Lander 3D in only 5K

Lunar Lander 3D in only 5K

My final submission was 5118 bytes, only 2 bytes under the limit! Interestingly, swfs seem to fluctuate by a few bytes every time you publish them. (My theory is that it embeds the time and date?). The one I’ve posted here on the site is exactly 5120 bytes!


Lunar Lander 3D from Plug-in Media on Vimeo.

Just like the original, it’s very, very difficult, use the arrow keys to move left, right, forward and back, and the space bar thrusts. Look out for flat landing pads of 4 lines, and head towards them. You need to go in really close, and you’ll know you’re over it as the land turns white when you’re directly over it. And you need to land right in the middle of the 4 lines, and very, very gently! See the playthrough video if you need more help.

Despite some stiff competition from the Brighton geek community, this was voted the winner! And the prize was exactly 5120 pence. So I went and bought everyone a drink with it.

It’s actually been really fun, and it’s given me a lot of ideas for future projects. I’ll post up the source with a bit of explanation soon, but for now you can play the game here.

[UPDATE] There’s now an even cooler version of MoonLander3D especially for the 40th anniversary of the Apollo 11 moon landing. Read all about it here.

Technical Reviewer: Making Things Move part 2

Friday, September 5th, 2008

Whenever anyone asks me to recommend a good book to learn ActionScript 3, I always tell them to run on over and buy a fresh copy of Keith Peters’ Making Things Move. In fact I was quite gutted when the first AS2 version came out; I’d spent the previous 2 years working out how to do most of that stuff for myself from scratch. If only it had come out earlier I would have saved all that effort!

So I was delighted when those charming chaps at FriendsOfEd asked me to be the Technical Reviewer for the latest version of the book!

Not only do I get to see the book before anyone else, I also get paid for it! Oh and I do have to actually suggest some stuff every now and again.

I must say it’s looking pretty damn good so far… of course I can’t reveal the exact content of the book, but you can read all about it here, and even pre-order it here!

And here’s Keith’s take on it. Oh and some bullet points, just to get you excited :

  • ActionScript for Flash Player 10 3D and Inverse Kinematics
  • New drawing API commands and PixelBender
  • Isometric world creation
  • Artificial intelligence including pathfinding and steering/flocking behaviors
  • Numerical integration for real world physics
  • Advanced collision detection

And if that doesn’t get you excited, I don’t know what will! (And yes, maybe I should get out more…) It’s due out 1st December.

What an amazing 2007!

Sunday, January 27th, 2008

Let’s face it, 2007 was pretty spectacular, in fact it was SO spectacular that it’s taken me most of January to write it all down…

ExtremePamplona title page

We flew straight into ’07 with a massive 9 level platform game, called Extreme Pamplona. It was so big, it took 15 people 2 months to make it, we even had to move into new offices to accommodate everyone!

Then we found out that we had come best in class in 3 separate IMA awards for the Plug-in Media website.

In February I re-launched our local Flash user group as FlashBrighton and we rather insanely increased our meetings to one a week!

In April, we were nominated for a Webby!

A trip for Boston for myself and Plug-in’s Creative Director Dominic Minns followed in May. We were invited to the New England Institute of Art to explain to an enthusiastic group of people exactly how we make games.
(more…)

Extreme Pamplona hits MiniClip

Friday, June 15th, 2007

ExtremePamplona title page

Remember that huuuuge game we were working on earlier in the year? The one that caused me to stop blogging for about 3 months and cancel Christmas? Well it’s finally up on MiniClip.

In fact it had over 103,000 plays in the first 20 minutes! And now after one day it’s had well over a million. Which is truly amazing and indicative of how massive MiniClip is these days.

Extreme Pamplona - London

It’s a massive 9 level platform game, each level is a different part of the world with a different enemy chasing you. In Paris you’re in a crumbling cathedral with Quasimodo, in Sweden you’re in a sauna with a fat guy with a towel, and in Amsterdam you’re running from a leather-clad dominatrix! There’s even a snowboarding level – see if you can find it.

But anyway check it out if you fancy a little lunchtime distraction.

Bitmap Parallax Techniques

Wednesday, December 20th, 2006

OK so it’s go go GO on this huuuuge platform game – 9 levels and a 1st March deadline. Yes, Christmas is cancelled. So I suspect that I may go a little quiet on the blog for a bit…

But… I thought you may like to know, I’ve been doing a little test on the best way to do parallax scrolling. What I wanted to avoid is having assets that come off the edges of the screen. If you make a parallax tile that’s one screenwidth, you pretty much always have to have two copies of it on screen because the join will always have to be in the middle of the screen somewhere.

So what I thought I’d try is convert the parallax layers into bitmaps, and then do bitmap fills for each one. The bitmap fill is the size of the screen, and the beauty of this method is that the tiles automatically repeat, because you can do that with bitmap fills.

So having got that working, sadly it seems that the original way is faster, assuming you cacheAsBitmap the layers. Ho hum.

Examples are here :

Using bitmapFill()

Using big tiles that go off the edge of the screen

The number in the top left hand corner is the number of ms per frame (average over 100 frames).

Now I’m going to try drawing the layers into a single bitmap instead. Wish me luck!

Artwork by Plug-in’s creative genius Dominic Minns, if you wanna see the (old) Christmas game that these assets are from : Red Nose Racer

Bad Behavior has blocked 793 access attempts in the last 7 days.