Alternative Version









February 8, 2021

MOHAA


Medal of Honor: Allied Assault






Medal of Honor: Allied assault was released in January-February 2002 and it’s one of the best FPS I ever played (in both modes: singleplayer and multiplayer).

More info: https://en.wikipedia.org/wiki/Medal_of_Honor:_Allied_Assault
Available here: https://www.gog.com/game/medal_of_honor_allied_assault_war_chest
Gameplay below:


Why am I talking about this game?

At that time, my computer was a Pentium II 266 MHz MMX with 64MB of RAM

Here is the MOHAA specs:
Minimum system requirements:
- OS: Windows 95/98/ME/2000/XP
- CPU: Intel Pentium II 450-500 MHz
- RAM (memory): 128-256 MB
- Videocard: 16 MB

Recommended system requirements:
- OS: Windows 95/98/ME/2000/XP
- CPU: Intel Pentium III 700 MHz
- RAM (memory): 128-256 MB
- Videocard: 32 MB (recommended graphics card on base GeForce 4MX or better)
[Source]   [Source]

As you can see, it’s not really compatible with my computer.
So I did an app in MFC to "optimize" the game and be able to play it (single/multiplayer).

Last week, I found the source code of this app and I will show you the before/after and how it works.


Optimize Audio!!!






Except for a few warnings, the app is still compiling and running (screenshot above).

The UI is ugly with big buttons but it was done in quick and dirty mode or MVP (Minimum viable product).

MOHAA uses Quake 3 engine and this engine uses zip file renamed in pk3 to pack their data (e.g textures, sounds, scripts)

The first step I did was to unzip all pk3 files and look at it.

I found that all audio sound effects was from 2 packages:
Pak3.pk3: All audios but dialogues
Pak4.pk3: Dialogues

I unpacked those packages
Unpack Pak3.pk3 96.8 MB (101,591,634 bytes)
Unpack Pak4.pk4 34.7 MB (36,390,346 bytes)

My app converted all wav files from this configuration:
Sample rate: 44100 Hz
Bits per sample: 16
Channels: Mono and some in Stereo

Into:
Sample rate: 11025 Hz
Channels: Mono
Bits per sample: 8

Here are the new size of those packages:
New Pak3.pk3 15.5 MB (16,295,849 bytes) 16% of the original size
New Pak4.pk3 8.64 MB (9,067,543 bytes) ~25% of the original size

The sound quality decreased but I will be able to play with my very low computer specs.

Here is a sample preview for audio (before / after):


Optimize Textures!!!






The audio part works fine with my computer but the images/textures are still too high for it. So the next step was to downscale textures.

Pak0.pk3 contains fonts and Pak1.pk3 contains HUD and menu. I didn’t update those packages because it will be harder to read the texts and menus after that.

Pak2.pk3 is the in-game texture package:
Unpack size: 585 MB (613,419,714 bytes)

I downscaled all tga and dds files (width and height divided by 2). I skipped the jpg files which are used for skybox and some posters.

Example of the before/new texture size:
512x512 -> 256x256
256x256 -> 128x128
128x128 -> 64x64
...

After the downscale pass, the package (store more) is 109 MB (114,778,638 bytes) ~ 19% of the original size.

Below are the previews before and after. Foliage quality decreased a lot compared to floors and walls but it was useful and funny in multiplayer to hide there with a shotgun :P

















It Works!!!






I used this version until I got a new more powerful computer. I was pretty addicted to this game.
I played everywhere: friends’ house, lan party, internet cafe gaming, ...

I remember the first time one of my friends played this game at an "internet cafe gaming" called "Dream City", he lost one of his contact lenses. The day after, he bought a computer just to play this game.

One night at my friend's house, I played online until 6 am in the morning. My friend was moving to a new apartment at 8 am. I was not in the best shape to help him.

I used the same app with Doom3 and that time, I also downscaled the videos. It was not for my computer, it was for my job computer to be able to play during lunch time.

I think we tend to be more creative when we are restricted with less resources (e.g startup versus big corporate, indie games versus AAA games).

Thanks for reading,

JS.