Monthly Archives: July 2008

Note: this post is a continuation of my previous article, The Gambler.

In my last post I spoke about my development on a recently launched live mass-participation game show. Since then the show has had three, very reasonably, successful broadcasts running 9pm til midnight Thursday across to Saturday. Grateful to the forgiving pool of beta testers who excused the previous technical dilemmas when we had them, the recent shows seem to have gone almost completely without hitch.

Being a hybrid format aiming to balance as much the creation of a social gaming community as extending the achievements of the original television channel, it’s interesting to explore how just as many of the inevitable teething problems we’ve encountered, have in fact, been outside of the technical scope. These problems instead, have been found to be more part of the process of migration to the new adaptation. The beta test group has grown to over five hundred users, with that, some unexpected and quite interesting trends have begun to emerge.

Initially, understandably taking off from the success of the original programme, the focus of the project was seen to be the live video content – the presenter-led broadcast with eccentric compere, who would introduce and commentate on the games in progress. This was key, and second came his interaction with the players, a communication only made possible by the translation to an online platform. This idea held quite innocently, saw the show as a direct port – the show simply delivered online – with just a change of viewing medium. What wasn’t predicted however, were the behavioural changes of online contestants, given now, that their level of participation has been radically reversed with it’s re-imagining, perhaps so much so, that this priority focus may need to be altered.

Previously the only way of answering questions for example, was by a single, individual phone-in effort at the (literal) cost of the player. This could only occur one at a time of course – and presumably then, one could not accurately know until the declaration of their answer, how long a single game could last. Now however, all players have free access and the opportunity to answer all questions, so there is no single ‘spotlight’. Short of a low threshold profanity filter, there are no barriers holding back players voices. As a result, the integrated chat client is furiously active, but an intriguing place. The users are already beginning to build the intended community sphere, but as much a place of social interaction, guaranteed after the final question of each game will the players begin comparing answers, scores, offering the most sincere congratulations and commiserations.

They are offering each other as much, if not more entertainment, than the assumed center of attention – the presenter. In some cases, the production team, not grudgingly, succumbs to the demands for more and more immediate and frequent games. The players too are beginning to see a shift in who really has control of the show. This confirms even greater still, the need for our technical system to be hardily stable and reliable. As online users become more demanding, the less compromise they (quite rightly) feel the need to offer in search of their own entertainment.

With most of the bugs and glitches ironed out of the game engine which now steadily ticks over as it should, the only remaining problem of any substance is the delivery of that live video broadcast. Acknowledged early on, the audio and visual quality would not be equal the digital television picture they’d previously broadcast, but we endeavoured to explore any way to best achieve something as near to that as possible. We also had to consider the amount of data being transferred to achieve this. Surely out maths must be wrong – with video at 300kbps, audio at a variable 128kbps, for three hours, for three nights, for up to one thousand users.. we abandoned the calculations when they began needing measurement in terabytes per night.

Instead we use a bespoke content distribution network (CDN), who specialise in mass content delivery, specifically designed to distribute large amounts of rich media. We push to one URI, essentially another Flash Media Server (the Flash Streaming Server equivalent of the Interactive Media Server) and it’s bounced around various worldwide locations, which each client subscribes to. We’ve had intermittent success with Limelight Networks, but this week will be changing over to Akamai, who boast leadership in streaming media services, hopefully to solve our remaining issues.

The beta phase will continue for a further three weeks, over which time the audience figures will steadily rise. Future projections intend the system to reliably run for up to one thousand users, a figure we currently see confidently attainable. Beyond that stage, only now beginning to be considered, will need to bring more significant architectural changes. We’ve discussed using multiple Flash Media Servers for the game engine, whether sharing the load or sharing the connections – or construct some hierarchy of master to slave servers.

Although with Adobe’s release of Flash Media Server 3 the licencing costs have been dramatically reduced, the overheads will amount regardless. With that in mind, I will start to look at running Red5, an open source Flash RTMP Server – essentially the open source equivalent of Adobe’s FMS, as it becomes more stable and nears it’s first public release.

Be sure to check out it’s roadmap. And other open source Flash projects.

At the beginning of April I was invited to the most brief and preliminary of development meetings concerning a forthcoming project, then only a concept for a web-based, live mass-participation game show. We were told it would be exclusively online, combining a high-quality live video feed of a presenter-led programme, facilitating up to 1,000 paying contestants to simultaneously compete for real money prizes with a number of interactive games.

I was invited because the primary candidate for deployment was using Flash Media Server, which I had a intensive experience with in my final year of university. Primarily I was asked whether the project was feasible, achievable and did I feel using the FMS the right approach technologically, because no one else on our team had previous dealt with it. Although less than a year since my work at uni, it was quite apparent that the scale of the project was going to be significantly more demanding than anything I’d worked on before, but I figured I say yes anyway.

The project itself is deceptively complex, but stubbornly never so in explanation. Essentially, it’s a enriched online port of the infamous interactive game shows despised on late-night television – you know the ones with premium rate numbers and supposedly con viewers? They’ve all pretty much been scrapped now, so this idea was (and because it had to be) a completely new format – the idea of a game of skill, with straightforward general knowledge and trivia as opposed to frustratingly ambiguous questions; without the premium rate number to join a queue of callers, instead, an approx. 25p entry fee that goes to an accumulative pot entitling you to answer all questions posed. The eccentric presenter remains, the live video stream remains as-near-as-we-can-to-broadcast quality – the exception being the intended hundreds of players compete simultaneously, meaning every question and answer must be timed, recorded, logged and audited with a robust and secure system.

I only truly realised the scope of the thing after so eagerly agreeing to build it when I began to comprehend the vast difference between this project and that I’d previously built at uni. We had a substantial amount of R&D time to really consider whether FMS was our best option, it’s capabilities, limits, the licensing – and being the only member of the team with any experience with the FMS, we were cautious to commit if it could be achieved some other way we might feel more familiar with – an open socket model with Java or PHP maybe – but FMS eventually won through.

The project required was a standalone engine to run, load and dispatch data, make remote procedure calls to server-side scripts, all independent of any administrator control unless commandeered. At this point, looking back at Talkboards which stored all dynamic data in persistent shared objects the user simply subscribed to, its entirety was equal to the live chat ‘feature’ alone.

Building this engine immediately began to highlight Adobe’s lack of development with the Media Server since obtaining it. It’s still pretty much Actionscript 1.0 – or near enough, their API confesses ‘Server-side Actionscript’ is just their name for JavaScript 1.5. So OK, back-date the code – and no type declarations unless you want the app to silently unload, but there’s also no use of the Delegate or EventBroadcaster – arguably the backbone for Actionscript development. I also wanted to avoid using prototype functions where I could and try to divide the code into some kind pseudo-class system – not only to be more logical and readable, but for any later hand-over or joining of other developers to the process. But this could only really go so far to contextually separate ASC files that all load from the app’s main.asc anyway.

Problems with the absence of the Delegate and EventBroadcaster are obviously not uncommon. Peldi ported the classes to ASC files in his handy Flash comm server book, some hosting services, such as Influxis, bundle their own frameworks with hosting packages. But the more complex the objects and lengthy the extensions from the top-level Client and Application classes, the more scoping errors I encountered.

Jesse Warden wrote an interesting article concerning the Observer pattern experiencing the same problem developing Flex applications:

“With a little work… you can implement FMS server-side components into Cairngorm 2. For ever server-side component you create, you merely create a client side equivalent as an Observer. It listens for NetConnection or Remote SharedObject sync events and dispatches events. These events run Commands which in turn set data… just like normal. If your Views are bound to said data, boom, you’ve got a nice, clean separation.”

Ultimately we devised a model that essentially handles quite a complex (application) data object, passing itself around via prototype functions, making amendments and modifications and passing itself on. Each client has their own (client) instance (that extends the Client class), enabling their unique connection to call server-side methods – and vise-versa – without needing to loop around the application.clients array.

And finally, last Saturday was the pilot launch. Initially a beta test group of 100 competition winners and by and large, it went extremely well. Surprisingly, the biggest infringement was on behalf of our PHP/MySQL host, who happened to have hardware difficulties that day. So although all still proceeds to go well, I won’t count my money at the table, episode number two is tonight – with an increase to 300 users.

Having severely neglected this blog for over seven months, I thought it now about time to involve some effort in reviving it.

Since then having seen a change of job, flat, quite literally the explosion of my previous computer (oh, dear poot :( ), an abound of blogging opportunities have gone amiss I won’t attempt to condense in a brief apologetic summary – instead only promise to try harder.

My new job – I say ‘new’, I’ve been there pretty much the length of this absence – alone has probably presented me with the most would-be blog posts not written – all things Actionscript 2, 3, Flex and AIR and recently reviving the challenges of FMS laid dormant since my final year of uni.. I’ll get round to these as and when.

Oh yeah – since Talkboards is now offline and my http://marchibbins.com domain redirects here, I guess it’s about time I developed some kind of real webspace.

So some actual blogging to follow. The only other regrettable omission was the chance to big up this year’s graduation show from the Interactive Media Production course at Bournemouth Uni – the course I graduated from last year. Pixel Pier was the name, showcasing this year’s IMPs at Richmix in Bethnal Green. Their site has a bit more content then our effort, seems the profile pages all link to their projects hosted online – have a look.

I went out for a ride and I never went back.