Apex Designs w w w . a p e x - d e s i g n s . n e t
Contact Us | Forum | Mailing List

Notify me when this site is updated:
news games tools shop links email about
s t a t u s   r e p o r t

Payback

10 February 2003 | 100,000 lines later...

Introduction

Welcome to the fourth status report on the development of Payback for the Gameboy Advance. If you haven't read the first three reports then you'll find them here. I've just worked out how much code the GBA version of Payback now has - it works out at an astonishing 100,000 lines! 16,000 lines of those were written specifically for the GBA version, and 7,000 of those are hand optimised assembler. No wonder I'm starting to dream about mixing algorithms...

Mixing

Speaking of which, the audio mixer has been my primary focus this month. A few of the key features of the finished mixer are:

  • 8 channels @ 24 kHz. Most mixers only mix at 16 kHz so Payback's audio sounds significantly crisper than usual, especially through headphones. The large number of channels also allow complex music and sound effects to be played at the same time during gameplay.
  • ~10% CPU usage (with 8 channels @ 24 kHz). Taking into account the above-average mixing rate and large number of channels, the mixer is roughly twice as fast as other similar routines. Of course, the mixer supports all the usual features such as pitch shifting, looping and seperate volumes for each channel.
  • 16-bit internal processing. Of course, the final output has to be reduced to fit the GBA's 8-bit sound output but using 16-bit internally (the same bit-depth used on CDs) still improves sound quality.
  • ~1.8K IWRAM usage. Since the GBA only has 32K of IWRAM in total it is important to leave as much free for other performance critical routines as possible. Other mixers use as much as 8K of IWRAM and don't offer such good performance.

The game will feature both sound effects and high quality in-game music using a MOD player I also developed this month. The mixer skips unused channels so efficiently that, on average, a 4 channel MOD uses just 4.5% of CPU time at 24 kHz.

The audio system tracks the position and movement in 3D of up to 128 sounds, even when they're out of earshot. Before being mixed, the samples have their volume and pitch calculated so that nearer sounds are louder and fast moving sound sources are doppler shifted. This advanced system allows sound effects to be attached to almost every event - you can even hear people's footsteps and bullets ricocheting off walls and vehicles.

Next month

The focus for the next month will be on fixing bugs, implementing the multiplayer mode and adding save game support. I have started work on the multiplayer mode, but to date I've only progressed as far as getting the GBAs talking to one another. On first impressions it doesn't look like it will be too hard to implement although I might regret saying that by next month. :)

James Daniels (james.daniels@apex-designs.net)
Apex Designs (www.apex-designs.net)

Please feel free to email us with any questions, suggestions or enquiries. We do not yet have a publisher for the GBA version of Payback. For general information about Payback, please click here.

 [ s c r e e n s h o t s ] 


The snow even settles on the ground

A bus slides out of control

The map shows the road layout ahead

A car can only take so much punishment before its fuel tank ignites


All screenshots above may be freely distributed but should not be modified and must be credited to Apex Designs.



" Politicians are interested in people, not that this is always a virtue. Dogs are interested in fleas. "
P J O'Rourke