Resurrected Entertainment

Archive for the 'Games' category

Building Wolfenstein 3D Source Code

June 16, 2014

Way back on Feb 6, 2012, id Software released the source code to Wolfenstein 3D — 20 years after it had already been written. The source code release does not come with any support or assets from the originally released game. In fact, id Software is still selling this title on various Internet stores like Steam. I played around with a DOS port of the DOOM source code quite some time ago, but I had never bothered to try and build its ancestral project. Until now!

As it turns out, it’s actually quite straight-forward with only a minor hiccup here and there. The first thing you’ll need is a compiler, that almighty piece of software that transforms your poorly written slop into a form that the operating system can feed to the machine. For this project, the authors decided to settle on the Borland C++ v3.0, but it is 100% compatible with v3.1. I don’t know if more recent compilers from Borland are compatible with the project files, or the code present in the project produces viable targets, so good luck if you decide to make your own roads.

As per the details in the README file, there are a couple of object files you will want to make sure don’t get deleted when you perform a clean within the IDE:

  • GAMEPAL.OBJ
  • SIGNON.OBJ

You can open up the pre-built project file in the Borland IDE, and after tweaking the locations for the above two files, you should be able to build without any errors. The resulting executable can then be copied into a working test directory where all of the originally released assets are located, I believe my assets were from the 1.2 release.

There are also a few resource files you must have in order for the compiled executable to find all of the right resources. According to legend, the various asset files were pulled from a sprinkling of source formats and assembled into “WL6” resource files. A utility called I-Grab, which is available via the TED5 editor utility, produced header files (.H) and assembler based (.EQU) files from that resource content which allowed the game to refer to them by constant indices once the monolithic WL6 resource files were built. There are annotations in the definition files, using the “.EQU or .H” extension, with a generated comment at the top which confirms part of that legend.

The tricky part in getting the game to run properly revolves around which resource files are being used by the current code base. The code refers to specific WL6 resource files, but locating those resource files using public releases of the game can be very tricky because those generated files have changed an unknown number of times. Luckily, someone has already gone through the trouble of making sure the graphics match up with the indices in the generated files. The files have conveniently been assembled and made available here:

After unpacking, you’ll need to copy those to the test directory holding the registered content for the game. Note that without the right resource files, the game will not look right and will suffer from a variety of visual ailments, such as B.J. Blazkowicz’s head being used as a cursor in the main menu, or failing to see any content when a level is loaded.

Multi-player DOOM on an IPX Network

June 7, 2014

If you want the feel of a light weight and efficient network protocol, then you can start a multi-player game of DOOM via the Ultimate DOOM Setup utility on one machine and the corresponding IPX setup tool on the other machine. The easiest way to do this is to use the Windows 98 protocol stack with the following components installed:

1. Client for Microsoft Networks
2. Appropriate network adapter
3. IPX/SPX-compatible Protocol
4. NetBEUI
5. TCP/IP (you won’t need this for DOOM, but you probably will want it)
6. File and printer sharing for Microsoft Networks

I have read that you may need to enable both file and printer sharing, but personally I haven’t verified that, and I don’t really see how the components are related. If by some chance they are required, the NetBEUI protocol seems to be a requirement for the sharing to work reliably on networks between two Windows 98 machines or a Windows 98 to a Windows XP machine. I was also running this over a wired network on the same router, so if you have one or more wireless routers, make sure that machines can see each other on the network (one reason to get file sharing working between the two machines). A couple of things to keep in mind:

1. Make sure they are on the same Gateway (mine is 192.168.1.1, which is just my router)
2. Make sure they are using the same sub-net mask (I use 255.255.255.0)

A few notes on the IPX configuration:

1. Make sure the frame type is set to “Auto”
2. Make sure the network address is the same on both machines, I use the default address “0”

I have been trying off and on for a few days to get two machines using DOS-compatible IPX protocol stacks to talk to one another, and it has not been easy. I will post about that once I get them working.

2D Scrolling and EGA Support

May 29, 2014

Originally, I was using a Matrox Millennium PCI graphics card in my DOS gaming box, but I found the 2D scrolling performance to be somewhat lacking as games like The Lost Vikings would shear while playing. The card also has virtually no EGA graphics mode support, which was important to me since I wanted to run games like Crystal Caves from Apogee, and I also wanted the development option of writing computer graphics programs written for this video mode.

Enter the S3 ViRGE (Virtual Reality Graphics Engine).

Interestingly, this was S3’s first attempt at a 3D graphics accelerator card. The performance was somewhat lower than expected, however, making the card only slightly faster than the best software renderers at the time, and equal to those renderers when anything other than the simplest 3D techniques were used. Because of the card’s poor performance, it was dubbed the “Worlds First Graphics Decelerator” by critics in the graphics and gaming communities.

I own the “DX” model of this card which is somewhat more performant than its predecessor, but I didn’t buy the card for how well it could render 3D graphics so it matters very little to me. I bought the card for how well it could accelerate 2D graphics and its support for lower end video modes, and it is very impressive thus far.

Space Invaders in SVG!

I wrote a little space invaders game in SVG (Scalable Vector Graphics) several years ago. It plays sound effects and has a few of the essential features within the game. I have recently modified it to work on Google Chrome browsers, since it was originally built to run within Adobe’s SVG Viewer plug-in which could only run on Windows 98 or XP platforms.

It’s a great game for people who are new to programming to get their feet wet and hack around with it. Some of the core concepts needed to modify the game to any great extent would be a rudumentary knowledge of JavaScript, SVG, and DOM level programming; you can run the game in the browser directly, there is no need to embed it within an HTML page although that is certainly possible, and you also download it here. You can move the player using the ‘A’ and ‘D’ keys, and fire with the ‘S’ key. The space bar pauses and unpauses the game.

Here is a little excerpt taken from the Space Invaders Atari 2600 manual:

Welcome to Space Invaders! Before you can begin playing, the first step is to place your cursor over the docking rectangle in the upper-left hand corner. Once the cursor has been positioned over the rectangle, click it and it should change color. Lift your hand from the mouse and you’re ready to play!

You are a recent enlistee in the Earth Defense Corps. For the past six weeks you’ve undergone grueling and intensive training. Now you stand at attention, nervously anticipating the most critical section of your training…

“Okay, kid, you’re on!” barks your commanding officer.

Quickly you climb into a laser tank. A second enlistee follows you. You each settle into deep, leather seats. With a soft whirring sound, the automatic hatch cover closes overhead. As your eyes adjust to the dim light of the laser capsule, you begin to make out the controls. Mentally, you check off each knob, dial, button, and display. For the next several hours you and the other enlistee with operate these controls to defend your planet in an attack simulation. The screen in front of you lights up. A column of bomb-dropping aliens advances toward you. What next? For a second your mind goes blank. Have you learned your lessons well? No time to refer to the manual now. Your commanding officers are watching and it’s your show.

Your tasks are to stop the invaders from landing on your territory; avoid enemy bombs; and score as many points as possible. The simulation ends when you lose all your lives or when any invader lands on your planet. If you destroy all 36 space invaders before they touch your planet, a new set of invaders will appear on the screen. Each new set of invaders will move a little faster than the previous set.

You begin each game with three shields. Initially, you are safe behind the shields. But as you and the enemy hit the shields with lasers and bombs, they become damaged and eventually disappear altogether. As the space invaders come close to the shields in their descent toward you, the shields will be destroyed and your only hope is to destroy the remaining invaders before it’s too late…

Child of Light

May 22, 2014

Child of Light Rendition

My wife is having a great time playing the Ubisoft game called Child of Light. It looks absolutely gorgeous with an interesting narrative and character model, great music, and a fluid control system. I am definitely looking forward to playing it!

Windows 98 Game Machine

May 12, 2014

Windows 98I have been wanting to build a Windows 98 retrobox machine for a long time, since running Windows 98 games in a virtual machine with hardware acceleration that works is next to impossible, and although I know of and have downloaded games from services like Steam and gog.com, they don’t solve the problem of how to install other Windows 98 software that I am interested in using. I also enjoy the visual nuances produced by 3DFX chipsets and drivers which are not emulated by either service.

The trick is in selecting the right hardware for maximum compatibility and performance. As a starting point, I have chosen the following pieces of hardware to assemble a basic machine:

  • Asus P4B Motherboard with 512 MB of RAM
  • SoundBlaster 128 PCI
  • Radeon 9600 Pro PCI with 128 MB of VRAM
  • DFE 538-TX PCI Network Card
  • SD Card to IDE Interface Board

The last item may need a bit of explaining. Basically, I don’t want to deal in hard drives anymore; I want a technology which I can use to easily backup and recover software images for some of the older machines I maintain. I also want something a little less noisy and faster than a typical hard drive used the in early 2000-2006 period for Windows 98 installations. After some research, I have ordered a unit or two off of eBay a few weeks ago for just a few dollars. I want to use just one or two to trial the hardware, since I have never used these boards before and I don’t know what their limitations are. I have been using the board now for a few weeks and it seems to be performing nicely. I really enjoy the ability to remove the “drive”, shove it into an SD card reader, add a few files which would have been otherwise tedious to download via the platform’s ancient Firefox installation (I am using the latest for the Window 98SE platform, which is version 2.0.12 I think).

A warning around RAM and Windows 98SE installations. I began this process with 1 GB of RAM and throughout the process of getting my benchmark games up and running and the platform driver installations ironed out, I was plagued by mysterious problems like random crashes, screen freezing, DirectX audio issues, and out of memory errors. The out of memory errors happened less frequently, unfortunately, which made debugging the issue rather difficult, since it appeared that my sound card drivers were the source of the problems and not the onboard memory. In the end, it was due to the amount of memory I had installed on that motherboard several months ago. Once I removed the “extra” 512 MB of RAM, things just started working flawlessly. I have done a bit of research and it seems that certain hardware and software problems within the OS can trigger these issues, but it is still possible to enjoy 1 GB of memory on some installations and OS configurations, even though the operating system may not use it. In general, if you have a Window ME installation available, then use that as it seems to be a more robust Windows 98 era platform.

The games I have tested so far are Deus Ex and System Shock 2; there are issues surrounding the latter within my new installation, which I will get into in a later post.

The Music in id Software’s Quake

March 15, 2014

I had no idea that the music and various sound effects were created by Nine Inch Nails lead singer, Trent Reznor. That’s just a small glimpse into the popularity of id Software and their games at the time. If you don’t want to read the book, one particularly interesting video history of the company is available on-line.

id Software

Day of the Tentacle Quote

June 26, 2013

“Behold, children!” shouted Doctor Fred behind them. “The Chron-O-John!”
“Doc, can’t you just send Bernard?” said Hoagie.
“No,” said Doctor Fred, “you must all go to increase the odds that one of you will make it there alive!”
“Have any people ever been hurt in this thing?” asked Bernard.
“Of course not!” said Doctor Fred dismissively. The three students cheered up. “This is the first time I’ve ever tried it on people!”

Treasure your Console

Console

Ouya Console

There are some people who are collectors, they love to hoard and collect things of all types, and others who git rid of things as soon as they stop using them. There are still others who shoot them on sight when playing Mass Effect 2. Unfortunately for video game consoles, they tend to be traded, given away, or discarded more often than not as soon as the next big thing comes along. The fact is that for many of us, it is simply not practical to hold onto every piece of hardware that crosses your path, even though we may want to hold on to it.

I enjoy playing games on the console hardware, but I also enjoy playing those same games through an emulator because some the console’s quirks can irritate me after a while. I tend to be a pragmatist when it comes to gaming nostalgia; generally speaking, if I don’t use or enjoy the console or the games available for it, then I will get rid of it. The reasons for doing this are almost always centred around clutter; I relish my hobby more if I can find and use the games I enjoy more easily. I almost never throw these systems away, although a friend of mine will attest to an unfortunate incident involving a fully functional Atari ST computer and monitor going into the trash in a moment of weakness, but these incidents are very rare thankfully.

These bits of retro hardware are full of little issues for the modern gamer. They don’t work very well on new televisions, they sometimes emit a musty smell, their hardware eventually deteriorates to the point where certain components need to be replaced, they lack save state functionality, and they often require bulky things like cartridges in order to do something useful. Some of these problems can be addressed: the console hardware can be modified to support new output technologies like component or RCA or VGA, the failing hardware components can be replaced with higher quality modern electronics, new cartridges are often available that use flash or SD Card storage and, of course, they can be cleaned.

However, I am of the opinion that certain pieces of gaming hardware and software are more than just the sum of their parts and are worth hanging onto because they represent something greater, even if they don’t work that well out of the storage box. We are part of a very large body of people in the world who have been brought up with iconic video game characters like Mario and Zelda in their daily lives. Many other elements of video game culture such as the people involved, the companies behind the platforms, the art, music and sound effects have permeated our society over the last five decades. Many of these systems have long and varied histories, most of which are very interesting from a cultural and technological standpoint. They are the reason you are using a smart phone right now, and they are also the reason you television has a web browser. There are numerous books published on video game history and technology which are available through various on-line retailers or perhaps directly through the author’s own web site, if you desire something fun and interesting to read. For those systems you found fun to play, try hanging onto them for a while, your kids may enjoy using them and you may certainly enjoy regaling them with interesting historical tidbits as they develop an appreciation for the devices they use.

Day of the Tentacle Quote

June 24, 2013

maniac-mansion-day-of-the-tentacle-small

“You know what they say, if you want to save the world, you need to push a few old ladies down the stairs.”