Multi-user gaming in Flash – Lunar Lander tests

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 :

[kml_flashembed publishmethod=”dynamic” fversion=”9.0.0″ movie=”//” width=”600″ height=”300″ targetclass=”flashmovie” allowfullscreen=”true” fvars=”baseurl=//”]
(Visit original post to see Flash content)

The button in the top left makes it full screen. If all you can see is an empty landscape, it means that no one is playing. Usually someone will turn up within a couple of minutes, but if you can’t wait, then why not open the game in a new window and watch yourself playing?
[The ElectroServer is no longer installed so sadly this won’t work any more! But you can try the html version – game and viewer]

At the moment it’s very very primitive. It’s just literally receiving the data and updating the visuals as it gets them, that’s why the movement is quite jerky, even despite the fact that there’s a little realtime easing on there. Of course, I’m going to have to get a lot more into this, comparing the timings with the server so I can adjust for any inconsistencies in data, and of course predicting where the players should be now, rather than where they were a few hundred mils ago.

But I still find it utterly compelling, and naturally I’ll be explaining all of this in my upcoming Flash game programming training courses.

Last night, I left it running (it draws the trails of anyone playing as they go) and this is the image I woke up to :

Lunar Lander Multi user

I can’t help but think that Jer Thorp would be proud of me ๐Ÿ™‚

[UPDATE] due to popular request there is a high res version of this now on my Flickr page.

27 replies on “Multi-user gaming in Flash – Lunar Lander tests”

That’s awesome! I’d like to have a hi-res poster of your time-lapse on my wall ๐Ÿ™‚

I am proud of you! The time-lapsed graphic is beautiful. I’d love to see a bigger version. Of course it would be great to harvest some simple user data (age, gender, etc. and see if there are any distinguishable playing styles…

Thanks Jer! I have to admit the idea was inspired by (ie stolen from) your smart rockets. ๐Ÿ™‚ I’ll def be doing a larger resolution version, I was even thinking about whether I could use the AlivePDF library to create a vector graphics file to print really huge! // ๐Ÿ™‚

Oh and I also meant to ask how you would get information like that? I could probably get their geo location from their IP address, but anything else I guess we’d have to ask, huh? I wonder who’d be wiling to offer that information?

I think it’s interesting how it exposes the different processing speeds of the game on different systems. I can watch my ship slowly crash to the ground in 4 mins while seeing others whiz past at a much faster rate.

I think we’re definitely seeing some differences in frame rate, but I’m wondering if there are other factors that could cause that weird difference in speed. I’ll be setting up server-client time syncing and that should get to the bottom of it ๐Ÿ™‚

FYI Mac FP9 and FP10 are both slooooow. FP10.1 runs roughly the same speed as Windows version.

that’s interesting. Is that for the viewer or for the game itself? There is a huge bitmap in the background of the viewer, that I’ll get rid of and re-upload, but the game itself should be pretty light.

The game itself.

I tried some other browsers, Firefox and Chrome both seem fine. I can only get it to run slow in Safari (4.0.4). I get the impression it’s not frame rate related as the altitude counter seems to tick away happily.

You can email me if you want me to run some tests or want full system specs or something.

It actually is frame based (but it really shouldn’t be!) I’ll definitely be looking at optimising but if you could give me specs on the machines, that’d definitely be useful, and I’ll also ask you to check if I update it. The other thing about this game is that I’m running at 60fps which is double what I usually try, so I’m thinking older players might not like that ๐Ÿ™‚ Thanks for your help!

That’s wonderful.

The delay is interesting – I managed to flick tabs in time to see myself crashing.

@alistair Just seen it, and yes, very jealous ๐Ÿ™‚ Quite beautiful. I’m wondering if there are any other well known games that might produce comparable patterns. It has the makings of an interesting study.

Very nice. ๐Ÿ™‚

It would be even better to release a version which lets you see other players trying to land around you. Not a full zoomed out view like in the SWF above, but just including a few other ships immediately surrounding you. It would definitely add to the game.

Comments are closed.