Friday, July 26, 2013

CannonBall - Javascript Version

Yes, now you can play OutRun directly from a modern web browser at 60fps with sound and no plugins. 

You may remember that one of my goals was to bring OutRun to every modern platform and this takes us another step closer. Here's the Javascript version of CannonBall

It would be even more seamless if I could bundle the ROMs, but sadly you will have to provide these yourself for obvious reasons. 

It runs on mobile devices, although it's not playable yet due to a lack of controls. I recommend the Firefox Beta browser on Android. I can run the engine at 40fps on a Samsung Galaxy S3 phone, so 30fps mode works fine.

Technically, the core engine is converted from C++ using Emscripten, which is an amazing piece of technology. I also wrote a wrapper around the C++ engine in Javascript to handle timing and audio. Audio uses the new WebAudio API

It's clearly "very beta" at the moment. For example, full-screen mode works only in Firefox. Audio only works in Firefox Nightly and Chrome. Getting things running nicely has been a bit of a frustrating balancing act. 

The source code is currently forked and can be found here. It's quite hacky at the moment, as my main focus has been to simply get this running. 

Exactly how much I support this will depend on the level of interest. I want to get back to LayOut, amusing as this project was. You are welcome to embed it in your webpage if you provide a link back to my blog. 

5 comments:

Unknown said...

This is fantastic. This will even run smooth on even a low end machine..

Unknown said...

Do you remember the atari st and the amiga. both were great machines but the outrun conversions were dreadfull. The best version I thought was the zx spectrum at that time.. Anyway, would in it be good to see the real outrun game run on the amiga or atari st... IS IT POSSIBLE...?

yt said...

The Amiga and ST are pretty underpowered compared with the arcade hardware. Having said that, the conversions could have been a lot better.

One approach with these machines would be to convert the Megadrive/Genesis version and possibly upgrade some of the artwork to look less dark and horrible.

I'm not a fan of any of the original conversions apart from the PC Engine. (The Saturn version is a port so doesn't count!)

The Spectrum version recreated the levels and artwork well for such a limited platform. Shame about the framerate. You can read an interview with the programmer on this blog (just check the interview label on the right hand side).

Unknown said...

I've often wondered what computers and software were used in the creation of outrun. I thought the sharp x68000, but that came out in 1987. Super hang on and afterburner were great conversions probably got the same hardware. Shame it was only released in japan. Here in the uk it would have sold well.

yt said...

Yes, it's an interesting topic and one I know very little about in the case of OutRun. Bear in mind a 68k game does not need to be developed on a 68k based system.

One way of possibly confirming would be to look at the header appended to the assembled binaries. For example, OutRun has strings like "Error! Entry Mode=User" and so forth, which would have been added by the assembler.

Sonic, another 68k based game, which was being coded in during 1989 used a PC based setup with X68K assembler and the ERX68K simulator environment.

Some pictures here:
http://www.x-cult.org/cat/15/Genesis%20-%20Megadrive/94/ZAX_Megadrive_Dev/