Friday, November 15, 2013

Interview with Yu Suzuki & Ryu: The Making of After Burner

I'm delighted to bring you the first English translation of a piece of SEGA history from 1988. This interview with Yu Suzuki and Ryu presents a rare insight into the development of a number of classic AM2 titles.

I'd like to thank Fabrizio Bartoloni for translating the article. I tried to cajole a number of people into helping, and he was the first to agree. I've adjusted some of the wording slightly, but the original translation and Japanese text can be found here.

I'd politely request that other sites link to this article, rather than pasting the contents. This is a non-profit site with no advertising, so please be nice. :)

Interviewees:
Yu Suzuki. (Lead Developer)
Ryu. (Head of the consumer office)

YU: I'm the one responsible for "YU" as a name entry [on the high score table] when you power up After Burner. I've overseen the software coordination and planning of After Burner. I started my career with Hang On and then went on to create Space Harrier and Out Run.


RYU: I'm RYU and in charge of growing the consumer office. So far I've worked on the Out Run conversion [to the Master System]. This is the second time I've converted a body experience¹ game, but as the hardware is different, recreating the original experience is cumbersome in my opinion. Additionally, I've also created characters for the Anmitsu Hime² series and other titles.


¹ 体感ゲーム is a game genre when your body is used to control the game (and may or may not receive some bodily feedback from it).

² Anmitsu Hime is a Sega Master System game from the eponymous manga. Its Western market release has been adapted with heavy changes and it's better known as Alex Kidd: High-Tech World

RYU: The features of the forthcoming Mark III After Burner conversion are made possible by the new 4 Megabit cartridges. Until now 1-2 Mb cartridges were common; 4 Mb is not an industry first, but with so much more space the graphics and action can be closer to the original.


There aren't the 23 stages of the coin-op, but there are still 18 stages and the refuelling scene. The home version contents will be more or less the same. There will be differences, but I'm making the backgrounds and everything else to be as close as possible.

At first I thought converting After Burner would be easy. After Burner and Space Harrier use a similar system, but they should be better considered different challenges.

I'm sorry I can't show you anything yet; we're already at the stage where something works on screen. Please keep your expectations high as this is the risky phase where I need to be at my best. It's like performing a somersault. I asked Yu to show me source code to help with the conversion and he told me to look at the original (laughs).



The Master System version will feature FM sound and the graphics are also an improvement on Space Harrier.

YU: The After Burner arcade project started around December 1986. Our way of working during the project was quite different from common practice. Usually you start with a plan, but instead we went ahead without having defined one. We started with the things I wanted to do, those that were interesting and already feasible. This approach is like having three possible paths ahead and you have to try all three of them to find the best. 

Such an approach is wasteful as you can find two of the choices prove useless. You often have to go back and fix problems and can't find the way forward. Therefore, in our case there was a written plan, albeit a hazy one. Planning continuously changes according to the situation you're facing. 



There was a movie called "Top Gun". I'd wanted to make a game with war planes before watching that movie. My initial inspiration was [the anime by Miyazaki] Laputa: Castle in the Sky. I'd thought about capturing that science fiction anime-like feeling.



Anyway, as Sega's 'body experience' game wasn't intended solely for the Japanese market but was due to be exported to Europe, US and the rest of the world, it would need to be understood by an international audience. So I switched my plan and gave it the shape of a F-14. Americans seem to have a preference for realistic graphics on screen rather than Japanese anime-like fantasy worlds. Now Americans are developing a better understanding of Japanese fantasy though.



Development costs are an extremely confidential matter, as might be expected. But if we were to make a comparison with ordinary game hardware which doesn't have to change that much, the costs are incomparably high. This is because there are few common components. You have to change the PCB, mask rom, chassis and so on - all of them. It's a totally new thing, despite using some of the same concepts. It's technological innovation stacking up. When Hang On was made, the background was almost empty, but since we've been using Out Run's new system we can say that games like Space Harrier and Hang On are totally different from a technical point of view.



At first I wanted the scenery to be set between the Mediterranean area and the Soviet Union... but it went wrong (laughs). Although I wanted it to be like that.

RYU: I wanted to say Persian Gulf! (laughs)

YU: You wouldn't have seen the Persian Gulf. Anyway, it would sell if America could beat the enemy side, just like Rocky¹ did.

¹ a reference to Rocky Balboa winning over Russian champion in Rocky IV 

It's real scenery, and would tie together well. I have the big picture in my head. It would be set in Europe, including Italy and the pyramids. When we created Out Run I went to see the real thing. We don't have spare time like that now. I'm browsing issues of the oversees travel information magazine AB-Road. It costs just 300 yen (laughs). I'd like to make the backgrounds look as close as possible to the real ones.



When it comes to the Soviet Union, it seems you have to abandon the idea of 16-bit machines. Apparently, it would be a violation of CoCom. [The embargo against Warsaw pact countries by US and some Western countries]. I wanted to depict the Kremlin building but in the end I gave up. This is due to the enormous variation and number of patterns which would be impossible to fit into memory. A spherical shape consists of merely one pattern, but here you must render a large number of cylinders. 

The landing scene is indeed big, but it exists on its own, so there is just one pattern in it. There were so many things I wanted to do, but they couldn't be done within the limits of development deadlines. For example, I wanted the pilot to be ejected from the aircraft with a parachute. For the end sequence, I also wanted the protagonist to carry the princess in his arms whilst flying the enemy plane. 

I think it's important to make the characters stand out. The protagonists of Space Harrier, Hang On and Out Run all stood out. I'd like the same to happen with After Burner.

RYU: Despite the continuous advancement of console hardware for domestic use, there is still a huge gap compared to professional coin-op hardware. In the future, much will be said about narrowing this gap. 

YU: I want to work on body experience games from now onwards. I've been working on Hang On, Space Harrier, Out Run and After Burner, but to say it emphatically, they were all left half done. After Burner is roughly 60% done. I wanted to include a dogfight. Right now it's many versus one, there is no one-on-one. A fight of one versus a few strong enemies represents the real world.

All of this is because of a lack of time and technical problems. The incomplete features will be implemented in upcoming games. Our goal is to make games, from the onset, as close to the real thing as possible. If you look at other driving games when an ordinary car bumps into another you sometimes see an explosion or big accident as a result. 


I've tried to make Out Run as close to the real world as possible. Although the game is not the real thing, I've added many ingenious solutions to make it work realistically. As much as you could expect from a game. My plan was to aim at what would have been probable in a realistic setting. I didn't want Out Run to feel ridiculous when compared with reality.

Even if After Burner and Outrun have some way to go before reaching their goals, trying to make them entirely flawless would result in enormous costs. It would be nice to be able to create a game without worrying about the cost though. For this reason, it's an exaggeration to call them simulations. But I'd like to get closer to reality.

(1988)

Check out more interviews here.

Wednesday, October 23, 2013

LayOut - Complete Level Video

Here's a video showing a (not very playable) level I made whilst testing and bug fixing.


Click here to watch at full quality on youtube.

Wednesday, October 16, 2013

October Update

Things are really coming together now. It's possible to make a level that's more varied and interesting than most of those found in the original game. You can quickly export to CannonBall with a single button click and be playing instantly.


I coded some handy routines to quickly generate your own sky palette and ground palette, interpolating between two colours. Here's an example I generated in just 15 seconds.


I improved the interface and usability in certain areas as well, including the addition of zoom to the top-down road view.

At the moment I'm not really coding anything that interesting. I'm basically making a level and fixing any small bugs I encounter along the way. There are lots of minor bugs that arise in an application this complex and they take time to fix.

At the end of October I'm going to feature freeze completely. In November, I'll write the documentation, packaging the accompanying release of CannonBall and preparing for release. I'm excited at the prospect at releasing this thing.

In the meantime, check out this great article (in French) regarding unauthorized advertising in arcade games. It makes use of the System 16 Sprite Viewer I posted some time ago. 

Friday, September 20, 2013

OutRun Anniversary Update

It's the 27th anniversary of OutRun and we're long overdue a post about what I've been upto. Things may have seemed quiet, but that's only because I've been working intensely on LayOut behind the scenes. I say intensely, but as I'm married, 33 years old and have a full-time job in the games industry, finding spare time to program can be a luxury!

Excuses aside, yes, I thought I'd finish this project sooner. It would have been great to release LayOut for the anniversary. However, during development I came to the realisation that producing an editor people loved was more important to me than simply releasing a rushed product. And this is a hobby, so it's important that I love working on it myself.

Along the way, the feature set has ballooned beyond what I originally planned and LayOut, whilst imperfect in many ways, is greater than ever imagined. Let’s consider the features so far:



Realtime Level Preview
Full visualisation of the stage you are editing. All changes are shown in realtime. This uses a special widget that is an enhanced version of the core OutRun rendering engine from CannonBall.

Full Import of OutRun Data
Import and edit existing OutRun levels including unused/hidden levels.

Full road path editor
Define the path of the road, set the number of lanes and split the road into two.



Height Map Editor
Create 2D height maps, apply them to any section of road and preview your work in realtime. Every option is configurable, including options available in the original engine but not used by OutRun's levels.



Scenery Pattern Editor
Define your own scenery patterns. All options are configurable: shadows, sprite positioning, horizontal flipping, palettes, the internal engine draw/collision routine to use, repeat properties etc.




Palette Editor
Change the road, sky and ground colours. I will also implement sprite palette editing in the future so you can change the colours of everything in-game.



Level Mapping
Easily change the order of your levels, and map them to the 15 stages available in OutRun.

Multiple Export Options
Easily export to CannonBall. I'm simultaneously working on a new version of CannonBall to handle the exported level data. Shortly after release, I will work on an exporter that allows you to write directly to the original arcade ROM images. Yes, you'll be able to play your levels on arcade hardware.

Cross platform & Open Source
Coded using QT, the editor will function on Windows, Mac and Linux. The editor will be released under a similar non-commercial license to MAME.

Common questions I tend to get asked, that I will cover here:
1/ What about other games?
Whoooa one step at a time fella! Super Hang On uses a very similar track format so it wouldn't be inconceivable for me, or you, to add support in the future. But let's get OutRun to a good place first.

2/ What about sprite editing?
Yes definitely, in a future version. It's more complicated than you might think to do this properly.

3/ When will this be released?
I would expect November 2013 at the latest. Followed by a series of frantic updates.

I’m also thinking that we probably need to get a forum setup for discussion once the editor is released. Does anyone fancy hosting that?

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. 

Thursday, July 11, 2013

CannonBall in a Web Browser? (Updated!)

I've started converted CannonBall to Javascript so that it will run straight from a web browser with no plugins. I wanted to do this for a number of reasons:

  • It saves porting and means CannonBall will run on any every platform with a modern browser (e.g. tablets, phones etc.)
  • It's a good opportunity to show that CannonBall is pretty fast (some people doubt this). 
  • It will be pretty cool when LayOut is finished to be able to play a customised level by simply clicking a link. No download or messing around with files. 
  • It's interesting to me from a technical/tinkering perspective.
This might not be as painful as it sounds. I'm using emscripten which can convert C++ code to Javascript. (Technically it converts LLVM bitcode to Javascript, but you get the idea). And just to be clear, this version isn't intended to replace the downloadable CannonBall :)

So far, progress isn't particularly exciting to observe:


But actually this is more promising than it may appear. The entire codebase compiles and begins to run. It's simply stumbling on finding the roms as I need to package them with emscripten's file system. 

So far the process I've followed to get things running was as follows:

1/ Followed the tutorial here for the Windows setup. 

I failed to get everything working from within Visual Studio 2010. Suspect this is an issue with a 32-bit VS 2010 process trying to spawn a 64-bit process as part of the toolchain. But actually fixing this issue proved problematic as I couldn't get clang to compile under Windows, so was unable to compile a 32-bit version to test this theory.

From reading some forum posts, it appears that using Windows 8 would probably solve this issue and the prebuilt clang would work.

2/ Switched to using a Unix/MinGW approach. Plugged the following platform file into CMake.  Ran mingw32-make; prior to this point the makefiles are butchered by CMake to work with Clang and emscripten instead of MinGW. 

3/ Created a customized emscripten.cmake file, which essentially doesn't do very much. 

4/ Fixed the three million compiler warnings reported by clang. It's a more fussy compiler than VS or GCC. I also removed the dependency on the boost library for now to speed up getting something working. 

5/ Converted the bytecode to a html page with embedded javascript using:
emcc cannonball.bc -o cannonball.html

6/ Loaded the file into a web browser. It fails in the way we would expect and spits out some sensible output about the roms. Hurrah!

Overall, it's only taken a couple of evenings to get this far. And most of this time was spent messing around installing stuff, and failing to get things working in Visual Studio. Once I hit upon the right approach, things went relatively smoothly. 

I'll carry on coding over the next few days. As Emscripten supports SDL libraries out of the box, it shouldn't be too tricky to get something working. But let's see... 

Edit: Couldn't resist implementing the file system before bed to see what happened. It kind of runs. But obviously not very well as there's a bunch of stuff I need to do like replace the main loop. Not sure on the colours for now, but probably an easy fix.


14th July: I fixed the colours, and it is now running and playable:


Unfortunately, it's using the software renderer for now. The OpenGL renderer would need a rewrite to make it WebGL compatible. It doesn't just work out of the box. 

The speed is reasonable at 30fps currently, although a little choppy in places. I'm not sure what kind of improvement I could expect if I rewrote the renderer...

If anyone is desperate to work on this further, I can check my work into git for them to mess around with. I may work further on this in the short-term or I may switch back to LayOut again!



I also tested on my Samsung Galaxy S3 phone. It runs pretty well on the Firefox Beta browser (maybe at around 20fps). There's no way to actually control the game though! It runs like a dog on Chrome.

15th July: I realised that using the emscripten_set_main_loop was causing the performance problems. Rewrote the main loop, so that the frame timing is done in pure JavaScript, with a call to the external C++ tick function. This is a similar approach to the port of Snes9x.

The results are outstanding. Unthrottled, the engine runs in widescreen at 80fps in Firefox on my desktop PC.

On my Samsung Galaxy S3, the engine now runs at a solid 30 fps in the Firefox browser (I haven't tried it unthrottled yet). Given that most elements of the game only update at 30fps in the original arcade game, this means you can run OutRun at full-speed. Pretty impressive for Javascript running in a phone's web browser!

24th July: After some experimentation, I now have relatively solid audio working on the PC. Unfortunately, directly porting the SDL audio code didn't lead to good results. Instead I replaced the SDL code with custom Javascript using the WebAudio API and an interface into the C++ code.

The results are decent on a fast enough PC with Chrome or Firefox Nightly.

Sunday, June 30, 2013

Cannonball 0.19 - OpenGL Rendering

I've updated Cannonball to support OpenGL rendering. This means:

  • Large performance improvement, especially when using full-screen mode. 
  • Scanlines can now be used in both full-screen and stretch modes.
  • Filtering can be toggled in the config.xml for a softer look, similar to MAME.

The old software renderer will still be supported, but is toggled at compile time by unsetting the OPENGL flag in your build.cmake file. 


There are a few other improvements rolled into this build:

  • A minor bug was fixed in the road rendering. This occasionally caused road pixels furthest into the horizon to be displayed at the wrong position.
  • In widescreen mode, sprite clipping is now correct, so sprites close to the camera aren't deactivated so aggressively. This is most noticeable on levels with wide grassy strips etc. 

I'd consider this build beta for now. Please try it out and let me know if you spot any problems. If I haven't broken anything along the way, I will update the main page. Then it's back to LayOut, which has been neglected a little lately.

Download here.
Marcus has also updated the Mac version here.

Thanks to Legooolas for having a stab at the OpenGL code originally. In the end I rewrote everything myself as I wanted to untangle the SDL rendering code from the native OutRun video code. So now the codebase is a little cleaner in this area.