Home News Demo Stuffs Game Stuffs Serious Stuffs Travel Reports Multimedia Humour

Bad Mood

Doom into a Falcon 030!

Ever since the Atari Falcon was released to market in the 1992-3 period, there has been an abiding interest in providing games which could be considered to be state of the art back than. In most conversations on the topic, the words 'three' and 'dimensional' were proudly written. The Falcon was expected to confidently carry off the new wave of great games.

As we all know, it didn't quite turn out like that.

A very brief and sketchy history of Three-Dee FPS stuffs on the Falcon.

With apologies for any obvious glaring omissions, still if you want something better, maybe it's time to write in to us with it!

Very early on, the up and coming benchmark of digital coolness was either with shading or texturing graphics. The real elite would try to combine these, and throw in a bit of light sourcing as well.

Without any real commercial software backing, this took some time on the Falcon. There were a number of early prototype Wolfenstein style dungeons found in demos. Some of the most interesting routines that didn't make it into a game came from the group 'Inter', with some blindingly fast tunnels, remember the 'Obnoxious' demo, or even the 'Terrorise Your Soul' 96ktro? Unfortunately this came with some rather impenetrable source code, according to Mr Pink.

As for fully grown games, I have fond memories of the early 'Of Lasers and Men'. This started off with a viable semi-textured engine, but graduated to full textures. Unfortunately, this had a drastic speed-killing effect on a standard Falcon, even with the DSP employed. The coder, Arnaud Linz freely admitted in retrospect that he would have done things differently.

The first successful and fully realised FPS was the not at all obscure 'Running'. This sensibly compromised, semi-texturing the walls, but leaving floors and ceilings flat to keep the speed reasonable. To this day, 'Running' remains the benchmark on the Falcon against which all other attempts at FPS will be judged.

But overriding this was the activity on other platforms, well one in particular. We're talking the dominant MS DOS and Windows PeeCee. Back in the early mid nineties period, one game carried all before it, people played it endlessly, addicted to their DOOM! The rest of us looked on, carefully concealing our distaste of the clumsy beige box that ran it, whilst waiting for our turn!

Bad Mood, the first bite..

Of course, anything that could be done on the PeeCee, ought to be jolly well attempted on the Falcon. There have been Patrice Mandin's ports, but these were done without any concessions to the special features of the Falcon such as the mighty 16 MHz 68030! (Without the DSP either.)

It took another team to start making 'Doom' into something more digestible for the Falcon. We are of course talking about the first time around for 'Bad Mood'. At this point, I'll let our special correspondent, Doug Little take over for a bit.

I am not certain what the 'original' plan was because I joined the little BM team later than some of the others. There were already several very competent coders (including LaurentS/Thadoss) working on (what I believe was) a game - based on DView C sources which had been ported to Atari from PC by early members of the team.

So at that point it was already a working WAD viewer. It could load game files, draw the scene flat-shaded and wander around using the keyboard. It was not terribly fast, mainly because of the nature of the C port and 8-plane drawing, but had tons of potential and plenty of coders and other contributors wanting to do something with it.

Doug's role was to convert as much of the C code to 68030 assembler as possible and bring the Falcon's DSP to assist. The early Bad Mood team were not helped with the source code being somewhat protected at the time. A lot of what they learned about Doom was from observation over extended death match tournaments, and coding experiments which consumed a lot of notebooks. As to the amounts of code going into Bad Mood.

(Doug) Trivia: There are now 7600 lines of DSP source, around 73 pages using a 6pt font - so it is big. And essentially none of it is tables. When I picked it up again in 2012 there were already 48 pages of code there which I did print out, and had to go through and relearn line by line after forgetting how it all worked.

There were a number of people involved with Bad Mood, the first time around.

Doug Little (graphics engine, final version) Johan Klockars (initial conversion from DVIEW + BMSHELL) Laurent Sallafranque (map) Eric Pelissier (collisions) Peylow of T.O.Y.S. (audio/sfx) Dave Murphy (keyboard) James Cox (miscellaneous)

The final version, v3.07 was released in 1998. It offered a respectable walk around experience through Doom and other ID game .WAD files, such as Heretic and Hexen, even on a standard Falcon. There was no shooty death stuff going on. Of course some acceleration helped matters considerably. It seemed that an interesting story ended at that point when the original team lost motivation to carry on.

2012 and a prodigal son returns!

Last year, a poster going under the nick of 'DML' emerged on the Atari Forum. It only took a bit of basic deduction to work out that this heralded the return of the father of Apex Media, amongst other delightful works of code. Doug Little had lots of projects that he wished to start or revive. The one which has dominated, has been the picking up and starting again of the Bad Mood project, this time to take it all the way to a full game!

As to what he did at that point, here's the man himself again. This can be considered as the 'short' version! Don't worry, there's more to come!

One of the big changes since restarting in 2012 is the game itself. BadMood was turned into an engine API, making it into a sort of Doom graphics SDK.

I took the official LinuxDoom 1.10 sources and ported it roughly to Atari first. It was then relatively easy to isolate and disable all of the 'IdTech' rendering code in the original Doom code and route everything through BadMood instead. The result of that is a playable 'Doom' on the Falcon. There are lots of small painful details but that's the short version. :)

Unfortunately the C code for the game is actually slower than the BM engine is at drawing - in some cases much slower, so that ended up needing a lot of work too. I wasn't really prepared for that so it dragged things out longer than expected.

Bolting directly onto Doom wasn't really a clear plan from the start, but came about via some discussions on AF. I threw around some ideas about making an entirely new game, or bolting BM onto Doom. And the latter won by consensus :) It was probably also more likely to get finished!

So at time of writing. We've got a fully functional 'Doom' beta. The current 'official' version 0.5 dates back to July. Full gameplay is possible, but there are a number of fixes still needing to be done. It also needs a 14MB Falcon currently. It will run .WAD files that are compatible with LinuxDoom 1.10.

This hardly covers the amount of tweaking that has gone on, and is still going on under the bonnet. There are lots of little optimisations, all of which will help the frame rate. At some point, a version which is co-operative with the tricky bits of Centurbo 2 accelerators would be nice, as I can't get this to work at all, even switched down. Well the menu and game status panels do work, but the actual game world is reluctant to appear. The 1998 3.07 version interestingly does work in both accelerated mode and switched down to standard Falcy on that box.

However, v0.5 does work on my CT60, switched down to standard Falcy mode and a Doom 1 shareware .WAD in place. At that point, everything appears. There are sound effects, the monsters growl satisfactorily in the background. The DOS era sound blaster music is not missed! The game is surprisingly playable, even with a frame rate at the lower end of things. Although I might add that very close quarters combat gets a bit too exciting with the skippiness. Still, it's quite an achievement to get anything of Doom working on a standard Falcon, let alone to that level. I'm sure that Doug has further plans to optimise this until the code squeals "No more!" It will also be nice to get an accelerator friendly version. I imagine that quite low levels of booster, over-clockers such as Nemesis, Phantom et al, will show a great improvement even with this current beta.

I'm hoping there is a finished product, or at least a further beta release before the release date of Mag! But Doug is very easy to distract, as his latest experiments are dedicated to making a fully textured 3D simplified Doom style engine for the ST! It seems he is wildly succeeding there too, but wants to put that to bed and resume on Bad Mood before too long.

And there's more!

This is all well and good, but Doug considered that there was a fair chance that the achievement of getting Bad Mood to work on the Falcon 030 would be duly recognised, but then people would swiftly discard it, because it was the over-familiar 'Doom' with nothing new to add. Clearly he wanted to add value to this engine with a view to open-sourcing the code for those people who might want to do something different with it.

Over to Doug once more;

- Truecolour textures (well, to be accurate - every texture can have it's own unique 256 colour palette so it's effectively truecolour when you have several of them onscreen at once!)

- HD (high definition) texture path - you can overload textures in the WAD by making a truecolour .BMP with the same name and dimensions and sticking it in a special folder. This works for walls and floors, but not sprites (yet).

- Truecolour depthcue lighting. This is proper use of truecolour because the extra shades aren't present in the textures' palettes or the global game palette.

- Custom DSP 'pixel shader' for liquids with 8 configurable parameters, providing a wide range of programmable wobbly, sloshy effects on floor or ceiling textures. YT video of that being tested.

- Filtered mipmaps. Uses filtered subtextures, selected (roughly speaking) by distance. Reduces texture boil plus some speed benefits.

- Directional lighting. I only noticed this year that the PC version had this all along! I thought it was a Falcon-only thing, but the Falcon one looks better ;)

- 6 channel audio (really 3 separate SFX channels, each with stereo panning - indicates position of monsters etc.)

- Lots and lots of Falcon-specific optimizations, aimed at keeping the DSP and 030 cache busy - both in renderer and game code.

- 2 levels of cache and virtual-memory like behaviour helps speed up level loading and minimise disk access during play.

There are several other Atari extras which have been tested but are not yet tied up.

My personal favourite has been the liquids shader. Lots of oozing lava style fun. So far we've seen this in action on video only. There have been some beautiful screen grabs of the truecolor textures too. It's almost a shame to have to rush around and kill things, when you should be able to take five minutes out to chill!

But it's not just a one-man band!

The original Bad Mood project was noteworthy for the input of several interested people, as we previously detailed. This time around, it's not just Doug on his own either, as he tells us more on that score.

Several other cool people in the Atari scene have helped out in various ways since 2012 and need a mention. A productive conversation with Mikro led to the DSP floor texturing technique. It didn't take me long to write the code in the end but I may not have tried it at all without that conversation. LaurentS/Thadoss produced some baked/codegen truecolour sprite data for HUD weapons (which still has to go in! I keep getting sidetracked!). Some other smaller contributions and suggestions have been provided which I'll try to get included also - Shoggoth's SCP video mode patch idea, some fast code fragments from DefJam and others. I'll try to use anything that makes a good fit.

Focus and get it finished!

As things stand, this is a report on a still evolving project and not yet a review for a finished game. Doug is keen to get it finished, but he keeps getting more and more ideas as time goes on. I won't hold my breath, but hopefully we will have a final review on a finished Bad Mood for the next 'thing' that we release.

CiH and lots of help from Doug Little, so he's a co-writer - For Mag! - Sept 2013.

Back to Games.