Red Button Arcade
The Red Button Arcade One in Ten project was borne out of a realisation that, whilst they're nowhere near as powerful as the average PC or modern games console, digital set-top boxes are considerably more powerful than classic home computers such as the BBC Micro. As such they should achieve comparable or better performance when running video games.
In my youth I spent countless hours writing games on my Acorn Electron, a BBC Micro compatible machine. I was really quite young, so the games I wrote were not very sophisticated. Normally they were text adventure games with occasional graphical elements, all written in the BASIC programming language.
Because the games were written in BASIC, they were "sandboxed" within the BASIC run-time environment. That is, they could not interact directly with the computer's hardware; instead they solely interfaced with the BASIC run-time. This had a performance penalty.
The Red Button Arcade project aimed to deliver concept games that ran on the Freeview platform. Freeview set-top boxes have a run-time environment in them called MHEG. The entire BBC Red Button Freeview interactive service uses MHEG, this gives an example of its power. However, MHEG is to set-top boxes as BASIC was to the BBC Micro - it sandboxes applications and denies direct interaction with hardware.
In order to see this content you need to have both Javascript enabled and Flash installed. Visit BBC Webwise for full instructions
Making matters worse, MHEG was certainly not designed with video games in mind. Much needed trigonometric functions like sine and cosine are absent. Further, MHEG does not provide a data type for storing decimal numbers - integers (whole numbers) are the only kind supported. And, frightening to most software engineers, MHEG does not allow data elements to be held in arrays or programmer-defined data structures, which greatly simplify programming.
Against the odds, three games were written during the Red Button Arcade project. I'll attempt to describe each of these games here as well as the challenges in implementing them in MHEG. These games are concept work only and are not publicly available.
Nibbler
Nibbler is a poorly disguised clone of a game made popular on a certain brand of mobile phone.
The MHEG implementation aimed to be as efficient as possible; during each game tick, the head sprite ("ingredient" in MHEG terminology) is moved to its new location on screen and the tail is moved to the previous location of the head. Therefore only 2 ingredients moved each frame. Similarly, when a cherry is collected, the tail doesn't move but a new body piece is placed where the head was previously, effectively making the snake longer.
The biggest challenge in implementing this game was designing a data structure in MHEG that maintained pointers to each body part of the snake. This was implemented using a text string that is encapsulated by macros which maintained the correct structure of the string and provided access to desired ingredients.
Bounce!
This was the first game I developed in MHEG. The goal of the game is to "nudge" the yellow "ball" by using the arrow buttons on the remote control towards the green balls, whilst all the time avoiding the red ball (okay, they are very square balls!). The red ball gets progressively faster and changes its movement pattern as your score increases, meaning the game's difficulty increases as the player progresses.
The game employs some very simple physics calculations, giving the bouncing ball the appearance of inertia. There is also a gravity effect. MHEG required that these calculations be implemented using only integer arithmetic. So, to effectively provide precision of one-hundredth of a unit, all values were multiples of 100 of their real value.
Ping Pong
Another poorly disguised clone, this game was my first in MHEG to use a pre-compiled trigonometric lookup table to calculate the ball bounces and "spin". A table of 90 pre-computed sin() values representing 90 degrees is stored in the source code, from which complete sin() and cos() tables are derived.
This game also presented user input difficulties. Since set-top boxes do not notify the running MHEG application when a remote control button is held or released, only button press notifications are provided, it was not possible to only move the paddle when the up/down buttons were held. As a workaround, a single press of up or down will set the paddle moving and it won't stop until the opposite direction is pressed. A later addition allowed the player to press the Select/OK button to stop the paddle from moving.
User input challenges such as this limit the scope of games that can be implemented on interactive TV platforms.
Future of Red Button Arcade
There is some debate about whether the BBC should use public money to produce interactive entertainment (i.e. games) alongside its current linear output.
CBeebies and CBBC educational games are currently the primary gaming output of the BBC. In keeping with this, some of the learning gained from this project will be applied to new children's games in the near future.
The Red Button Arcade project has proved that real-time gaming is at least a possibility on current interactive television platforms. The games are of course very simple and in the future I hope we will push the envelope a little more and perhaps look at the more powerful Freesat and Sky platforms, or upcoming platforms.
The project also proved that real-time graphics processing is possible on Freeview set-top boxes. This opens up the possibility of developing applications that make use of real-time visualisation, for example to display audience votes or sports statistics. And as a team we're looking forward to exploring more the possibilities that provides us.
Mark Hatton is a software engineer working in the TV Platforms Group

~RS~q~RS~~RS~z~RS~25~RS~)
Comments
Sign in or register to comment.
Nice work Mark.
I used to do some MHEG work for Teletext and we "dipped our toes" in to more interactive elements and games, producing a Lottery number generator and similar ping-pong game.
Very very difficult within MHEG but, as your showing, it is possible.
Complain about this comment
I think I'd prefer to see license money and time spent by the TV Platforms group working on things such as better integration with Vista Media Centre. The red button doesn't even work there and I'm guessing there's no-one in the industry working with Microsoft to make it happen.
And as the iPlayer is now available all over the place, isn't it about time to get it integrated into media centre somehow?
Complain about this comment
Sorry, I'd say this is a definite waste of licensepayers' cash!
Complain about this comment
I'm going to have to disagree with galund here, while these games *themselves* are unlikely to provide value to the licence payer on any level, I can see where this research can be used to create value if applied correctly.
Although I do think the most important question is: who in the TV Platforms Group has the highest Nibbler score? ;P
Complain about this comment
Nice - I like the idea of using it. A lot of important developments have come because a few people 'messed around'. It'll be interesting to see how it all develops.
Oh, and I was also one of those people who spent countless hours on an Acorn Electron with BASIC (and later a BBC B, Archimedes and RISC PC).
And I second the more important question. How has the highest Nibbler score (there was a version for the Acorn Electron if memory serves me correctly).
Complain about this comment
Good, licence money spent well. Everyone keep on saying that the BBC should support other media companies this is a good examples of how, creating and developing a other platform to deliver games to people.
Complain about this comment
If you really want to play games on your Freeview box, check out the Topfield TF 5810 PVR. You can download all sorts of applications, including games, from toppy.org.uk, which run in the very limited amount of memory available.
Complain about this comment
digitalknave:
No, licence fee payers' money should absolutely NOT be spent on helping Microsoft improve their software. Unless of course Microsoft's software is going to be provided free of charge to an licence fee payers.
Complain about this comment
why spend time with MHEG when its clearly just not good enough? Ive seen these STBs play native Quake in a basic form and that was nearly 10 years ago.
The BBC is involved in all the standards groups, if you're going to spend license payers money why dont you decide what kind of API (openGL type) would be best and get it standardised. That would be much more efficient.
You need to ensure that the guys that decide what goes on the multiplex will let you have enough bandwidth (and its a lot as you keep needing to retransmit) to give you a reasonable download response on the carosel before you spent too much time and licensepayers money.
Complain about this comment
I agree with digitalknave that better integration with MS Media Centre would be a far more useful thing to do. It would give access to the BBCs interactive services for many who currently have no access to the red button at all.
Complain about this comment
To respond to some of the questions regarding Windows Media Center, I can tell you that as part of another One in Ten innovation project here at the BBC, I did some interesting work that involved getting BBC interactive content on that platform.
I'll be writing a future blog post outlining the purpose and outcomes of that project, so keep an eye out for it on this blog.
In the mean time, there's some info here:
http://www.bbc.co.uk/blogs/pressred/2008/11/innovation-and-the-red-button.shtml
Complain about this comment
Any media centre edition of windows, doesn't have digital tick certification so it is unsurprising that the red button features don't work. In fact I don't think any PC software is available which is digital tick compliant or indeed has the facility to interpret MHEG code. This is purely a manufacturer decision and only consumer's pushing manufacturers to provide digital tick compliant equipment will work.
As far as I'm aware you can only get tv software which understands MHEG using Windows Vista Media Center TV Pack 2008, which is OEM only.
Given that soon, we'll be switching to DVB-T2 which no software yet supports, it's worth holding back on buying a new PC just for the MHEG functions.
However, it raises a good point and the BBC and DTG should be doing a lot more with consumers, manufacturers and retailers to push "digital tick" products more. In the last couple of years, one major if not the biggest retailer of electrical products was caught red handed selling a whole variety of cheap and nasty non-compliant boxes as having the digital tick, despite the lack of this being picked up in the media, they have now stopped doing this but probably hundreds of thousands of boxes were sold under false pretences.
Complain about this comment
You're right, RobertBFC, the only version of MCE that supports red button action is Windows Vista Media Center TV Pack 2008. However, the implementation is quite clunky with older remotes, but does work well.
Although it's technically OEM it is available to download in various places on the Internet, and people have reported varying forms of success (including me with full success) in installing it onto Vista Media Center.
It supports Teletext and other interactive features such as the split-screen news etc. Well worth an install if you have Vista Premium or above. Best way to do it is to stop everything, start the initial MCE setup wizard from the settings menu but don't do anything, just quit the wizard and close MCE, install Windows Vista Media Center TV Pack 2008, the PlayReadyPC runtime, then service packs KB951685 and KB950754 in that order.
Hope that gets a few people up and running with Red Button on MCE.
Complain about this comment
View these comments in RSS