WolfGL

Introduction

Some time ago ID Software released the source code for their old Wolfenstein game, it was the first FPS game I can remember, with very cool graphics at the time it was released but not very nice for today's standards.I don't know the reason why nobody had any interest in it, I've seen several ports of Hexen, Heretic and Doom but nobody did a Wolfenstein port. Maybe that's because the code was very complicated and required a lot of changes:

It was a 16 bit program and most pointers were just unsigned shorts.
There are several assembler routines.
Drawing the 2D graphics is very complicated because of the VGA planes.
Memory management is more complicated than it needs to be now.

So I decided to take some time and work on a simple conversion, it only took me about 1 week to be able to play the game plus another week just to fix the menus and a few other details. I guess that the best way to describe it would be to call it a 'hack', it still has a lot of unneccessary code and the rendering loop is almost not optimized but I can get 70 fps at 800x600 with my P2 and Riva TNT system.

My goal while doing the conversion was to keep the game as close to the original as possible, I know how to add lightmaps and other nice effects but that's not what I wanted to do. The only improvements to the code was the ability to play more than 1 digital sound effect at the same time and I changed the savegame file format. I've also decided to use OpenGL for the graphics so you'll get a bilinear filtering for the walls, and the sprites will look a little better with the increased resolution.

While the core of the 3D rendering code was done in assembler, you can get most of the information you need to know (like the location of the walls and which textures to use) from the C parts. As the game map is divided in areas connected by doors, I wrote a simple loop to draw all areas that are connected to where the player is. The game already keeps track of that information, so I could easily know what needs to be drawn each frame and ended up with a very low triangle count per frame.

That's enough for now, I'll write more about the engine later...


WolfGL screen shot (33 kb)

Screen shot of WolfGL under Linux



Downloading & Installing

The first thing you'll need to do is to check that you have a 3D card with the latest OpenGL drivers or X server installed correctly, the game REQUIRES A 3D CARD and if you don't have one then you should use the DOS version. I have only tested this with a TNT card (under Linux and Windows 98) but I don't see why it shouldn't run on other cards.

Now you should get the data files from the version 1.4 of Wolfenstein, you can get the shareware files here or from your favorite shareware mirror site. It's important to make sure that you have version 1.4, the game data changed a lot from the other versions and WolfGL will crash if you don't have the right files.

The next step is to download the executable for your system, you can get the MS Windows version or the Linux version. If you want a port to another system, wait for the source code to be released or send me the required software/hardware and I might do it.

Now that you have all files in your computer you should unzip everything to the same directory (Linux users should make sure that the file names are all lower case), run "wolfgl.exe" (or "wolfgl" under Linux) and you're ready to help BJ escape Wolfenstein !

If you are the owner of the full version of Wolfenstein (3 or 6 episodes), you can download the executables for it. The archives do not include the data files, you need to own a copy of the game to use it and distributing those files is a crime. DON'T ASK ME FOR THE FILES, I'll just delete your message and ignore you.



Notes

I've removed the music because I don't know how to play it.
The joystick and mouse won't work under Linux, you'll have to use the keyboard (I'll fix it soon).
Since I upgraded to RedHat 6.1 my TNT card doesn't display the status bar and the menus correctly anymore.
I've played all 10 levels of the game and didn't find any problems, but that doesn't mean that the game is 100%.
Linux users can set the resolution from the command line with the '-width x' and '-height y' parameters.
Source code will be available as soon as I finish a few details.
If you have any questions, feel free to e-mail me.




Last update: November 14, 1999