DOS

How to run programs in DosBox

Modern operating systems do not come with MSDOS installed anymore. Because of this, programs like Wolfenstein 3D and it’s DOS-based editors no longer work “straight out of the box”.

To fill the gap, applications like DOSBox have been developed and released that let you use these programs again in an authentic DOS-like emulation.

When you first download DOSBox, it can seem a little confusing as to how to use it. But when you learn what the options are, it’s actually reasonably effortless!

Saving Memory in DOS

Once you start adding things to the original Wolfenstein 3D engine, you may quickly come across an "Abnormal Program Termination" error. This is because for all of Wolfenstein 3D's ingenuity, it was restricted by DOS's capabilities. Prominently, a restriction in the amount of memory available to the game.

Setting up the DOS Wolf3D source code

Thanks to John Carmack releasing the source code to the public back in 1995, people interested in making their own games can modify the engine itself to create whole new features and effects.

At the end of this guide you will have learned how to compile a working exe for the full version of Wolfenstein 3D for DOS.

The tools you will need:

Compiling the code for shareware Wolfenstein 3D and Spear of Destiny

The source code comes prepared to build version 1.4 of the full version of Wolfenstein 3D, but is actually capable of building for multiple different versions of the game, as well as Spear of Destiny!

This guide will show you how to change the code to compile for different games and different versions of them. It assumes you already have a game project that successfully compiles. If not, you'll want to check out the guide for setting up a Wolf4SDL project.

A basic RPG-style levelling system

Many games from all genres take inspiration from RPGs in the form of a "level-up" system. This system typically rewards the player "experience points" for tasks, and gives the player a "level" when a milestone is hit. Each level will generally make the player stronger in some way.

For this guide, we'll be introducing such a system to Wolf3D. By the end you will have a functional but basic system for levelling, where kills will reward experience, and levels will influence the amount of damage weapons do.

Removing the Lives system from Wolf3D (Beta)

A holdover from arcade games, Wolfenstein 3D is one of many games that utilize a "Lives" system in it's game - each time the player dies they lose a life, and when they have used up all of their lives, the game is over. The choice of using Lives is a design choice, and of course everyone has a different vision. What if you don't want to use them in your game?

Rearranging the status bar

In Wolfenstein 3D, the status bar is a static image, over which the stats pertaining to the player and game are displayed. Of course, in a different project, this design might not be relevant. Maybe the game has more than 4 keys, or the author doesn't want to display weapons, or simply wants things in different places.