I remember that Doom had a free trial version where you can play the first episode but the other two you have to buy. There are other games that did that as well. If I understand it, in order to do that the entirety of the game engine would have to be supplied, but the content itself would have to be limited. How did that limit happen, and how did the game know that you are trying to exceed the limit of the content that was available? I'm curious about Doom particularly but if there is a general method that was used that would be interesting too.
If I understand it, in order to do that the entirety of the game engine would have to be supplied, but the content itself would have to be limited. How did that limit happen,
Simply by not supplying the further content. Works well with any application that uses a clean separation of content and engine. No matter if it'a PDF reader, a HTML Browser or, well, DOOM.
Doom was delivered as two files:
roughly 700 KiB in size, containing the whole engine and
around 11 MiB in size, containing all game assets for all 3 episodes (*1)
In contrast the shareware version contained a
of ca. 4 MiB, containing only all assets needed to play all 9 levels (*2) of episode 1 (Knee-Deep in the Dead)
and how did the game know that you are trying to exceed the limit of the content that was available?
Simply by not delivering content past the first episode.
[I guess here is an underlying question hidden: How to stop someone to buy the full game and then share it with his friends? Well, there was no such protection. The game was open and ID simply trusted the user. Guess what, it worked flawlessly.]
I'm curious about Doom particularly but if there is a general method that was used that would be interesting too.
The point, as mentioned, is to strictly separate engine and content. Thus new content can simply be added. The WAD format and handling was made to support easy extension, thus modding as well.
More about WADs
The content files, called WAD (Where's All the Data), were essentially what one could today call a mountable, read-only file system. DOOM1.WAD contained ~1200 'files' called lumps, while DOOM.WAD had ~2200. Each and every asset from colours to textures, lines to maps, weapons or sounds and many more, were stored within as lumps. All references between the assets were pointing to (other) lumps to be found via the directory, not to within the game engine. This is why not only total conversions like 'Alien' were possible, but as well complete different games like Heretic or Hexen could run from essentially the same engine (*3).
When starting, the DOOM engine located all available WAD files and filled an internal directory structure with the headers of all lumps - think of it like mounting a virtual drive. But, other than with drive images, they weren't loaded as separate entities, but instead appended, in a predefined order (*4), into a single structure.
Since assets were always searched from the end of that directory structure, a 'newer' WAD's assets would overload 'older' ones. This is also why modding never required any patching. Just drop another WAD into the DOOM directory and/or add it to the command line.
If you're really interested in internals, there is not only the
- DOOM source code available online,
but also a very fine book available, called
- GAME ENGINE BLACK BOOK: DOOM by Fabien Sanglard (*5).
It offers a detailed walk-through for all algorithms, structures and usage plus a lot of background information and history. I would consider it an easy read, as he does a good job in explaining from zero - of course, some understanding of programming might help. A true work of love and worth it's money. The version I have is 1.1. (*6)
Of course, a peek into the
is always worth the time when searching for related information.
P.S.: And then there is this Tweet ... somewhat related and a reminder of the times when business was done via mail, not call centers or web pages.
*1 - Ultimate DOOM included a 4th Episode Thy Flesh Consumed
*2 - The XBox version got a 10th secret level.
*3 - Both engine were modified to add features like flight, or most notably a scripting language in case of Hexen.
*4 - Modifiable via command line sequence.
*5 - He did as well one about ID's first hit, Wolfenstein 3D.
*6 - Don't miss to stop by his blog/web site every now and then, as he not only adds more details about DOOM and its ports, but quite good articles about other machines and games as well.
In Doom’s case, the game was split into episodes, each split into multiple levels. The shareware (free trial) version of the game included the first episode only; a further two episodes were provided in the paid-for version. The game didn’t have to figure out whether you were somewhere “allowed” in the game — all the content provided was allowed.
This was a common model for many shareware games, such as Apogee’s games, id Software’s games before and after Doom (apart from Doom II), etc. In many cases, the first (free) episode was actually the best in the game — this isn’t all that surprising, since it had to be good enough to entice users to buy the rest!
In some games with more complex assets, the free version didn’t just limit the levels available, but also game assets such as textures or weapon models. In some cases the engine could be limited too, for example network play wouldn’t be possible in the free version.
Usually all this worked by having the full game adding content to the shareware version, or put another way, the shareware game shipping a partial version of the full game. In some cases, the shareware version was a straight subset of the full game’s files; examples include even early games such as Pharaoh’s Tomb, which had one executable per episode, and late games such as Quake, which used the same engine but had its shareware assets in one
pak0.pak file and the complement in another
pak1.pak file. In others, the full version replaced part of the shareware version; examples include Duke Nukem 3D, which has a 10.5 MiB
duke3d.grp file in the shareware version and a 42 MiB version in the full game.
The Digital Antiquarian has an interesting series on the shareware scene which provides a lot more context and information.
Doom and other 'Apogee model' games work exactly how you describe. The game engine is there, as are almost all of the assets, but resources for episodes 2 and beyond aren't included. The executable itself will be different from the full game slightly, with ordering information in the menu and so on.
To answer 'what was packaged?':
Doom stores its data in WAD files. I used a tool named deutex to extract all the files contained in the shareware Doom
DOOM1.WAD and the Ultimate Doom
DOOM.WAD, and as you might expect, there's files for
E1M9 in both, but Ultimate Doom continues on to episodes 2-4.
Jazz Jackrabbit is another episodic game, but since it stores each planet's graphics and layout in separate files it's easy to see what data each version includes. Comparing shareware Jazz v1.0 and Jazz CD v1.3, you can see that the first episode's first planet Diamondus
PLANET.000 is present in both versions, but the second episode's first planet Letni
PLANET.003 is only present on Jazz CD.
You might wonder if you can just copy data from the shareware version of a game into the registered version and vice versa - in some games you can, as long as the menu is set up to load them. The different versions of JJ1 have slightly different physics, and you can copy the shareware menu over the full game to play later episodes with the early physics.
This screenshot is from Jazz Jackrabbit Holiday Hare 95 - only episode X should be playable, but if I copy some files from the full game into the Hare 95 directory, the corresponding episodes become available to play. It looks like the menu doesn't hard-code episodes 1-6,A-C as being inaccessible, but only shows the 'available in registered version' message if the files are absent.
You might also enjoy trying the following in the shareware version of Quake: There's a variable ingame that keeps track of whether the game is the shareware or the registered version. You can change this by opening the Quake console with the backtick key and entering
registered 1. Now if you start a new game, the walls blocking episodes 2, 3 and 4 will be unblocked, letting you play them! Sadly, the maps themselves aren't included in shareware Quake so it'll abort loading with a
couldn't spawn server maps/e2m1.bsp error and soft-hang in the Quake console waiting for you to start a new game. You'll have to buy the full version. ;)
Original Doom publisher id Software released a number of titles before Doom including Wolfenstein and Commander Keen. These were released as shareware which meant they were free to be copied and shared, but the shareware versions were not complete and only contained a limited number of levels. Because the internet was not yet widely used, these versions were distributed on floppy disks, sometimes on the cover of computing magazines. This put the playable shareware version in the hands of lots of users.
On completion of the shareware game, you were encouraged to buy the complete title. I personally purchased a number of titles like this via mail-order. Floppy disks were very easy to send by mail and many titles sold through the shareware model didn't come in any bulky packaging making it a very cost-effective way to sell software for PC. There may well have been other similar models for selling software.
You asked if the game engine was supplied with the original release and then the data for additional levels supplied on purchase. I can't say authoratively whether that was the case with Doom, but many games back then fit onto a single floppy disk, so that single floppy would include both the engine and the level data. If a software house had to send out a second floppy to purchasers it really wouldn't make much difference if the entire game was sent out again. I recall one game I bought like this (the title escapes me) where the game was in two halves, the first half being shareware. The disk sent to me contained just the second half of the game which loaded independently. A code presented on completion of part one allowed you to begin part two.
Of course, the immense popularity of Doom following the original MS-DOS release meant that it was released commercially for many other platforms. These more commercial releases were mostly boxed-packages containing the full ported game.