Viewing Old Dos Game Files

Discuss popular GCS tools like ZZT, Megazeux and Adventure Game Studio, as well as programming and other topics related to game design.
Post Reply
Razza
Newbie
Newbie
Posts: 2
Joined: Sat Apr 16, 2005 6:15 pm

Viewing Old Dos Game Files

Post by Razza »

I'm just getting into game programming and was wondering how one would view old DOS game files to learn the code used then so I can adapt it for a new application. One of the games I'm looking at has file formats like ".ss", ".col", ".pik", and ".ff". How could open and view these files? Would I have to have a DOS emulator or are there editors that can open them in windows? Thanks for the help in advance!

Razza
User avatar
Dosser
Way too much free time
Way too much free time
Posts: 462
Joined: Sun Jan 02, 2005 2:05 am
Location: BEHIND YOU

Post by Dosser »

Open them in notepad: you might be able to crack what they mean through that.

If, however, you're expecting source code in there: prepare for disappointment. Those file extensions are probably invented by the programmers of the game to hold random data such as levels, save files etc.

To learn to program games, the best way is to learn the programming language first, then work on making games later. Try www.cprogramming.com to learn the basics of C (C is one of the major programming languages: and Java, C++ are very similar to C). Later, you can turn your attention to the allegro library or www.gametutorials.com (mainly about 3D games, but still can be useful to skim through).

Good Luck
Razza
Newbie
Newbie
Posts: 2
Joined: Sat Apr 16, 2005 6:15 pm

Thanks Dosser!

Post by Razza »

Dosser:

Thanks for the reply! I kind of figured as much, but there's always hope. What about old DOS cracking programs? Would these allow you see the code itself?

Razza
User avatar
Dosser
Way too much free time
Way too much free time
Posts: 462
Joined: Sun Jan 02, 2005 2:05 am
Location: BEHIND YOU

Post by Dosser »

I don't know what DOS cracking programs are, but I doubt they'd show you the source code of the games. The only thing that relates to the source code is the .exe file, but it has been encoded and translated so much it is impossible to reverse-engineer the source code from it.

You could always search (google it) for open source games, or tutorials on making games. These should contain the source code for the game as well as anything else you need to start working on games of your own.

Also, some companies have recently released the source code for their older games. IIRC Wolfenstein / Doom's source have been released (someone verify for me, I'm not entirely sure) as well as many others (sorry, can't think of any more off-hand).
User avatar
dr_st
Way too much free time
Way too much free time
Posts: 381
Joined: Wed Jun 23, 2004 2:49 pm
Location: Absorbed into Clayface

Post by dr_st »

You cannot view the source code from the EXE. The only thing you can is view the Assembler code, using some kind of debugger utility.
User avatar
emmzee
Site Admin
Site Admin
Posts: 2476
Joined: Sat Sep 14, 2002 2:25 pm
Location: Ontario, Canada

Post by emmzee »

You can sometimes use "decompilers" to turn a .EXE back into source code. (I remember doing this in one of my Java classes ... I mean, one of my evil friends did it :shifty:) The problem with that is twofold ... first, you have to know what language the game was written in (and sometimes even what compiler they originally used). Secondly, the source code generated will generally be missing meaningful names. (So for example instead of 'player_heath' and 'ammo' you'd get 'a' and 'b', since variable names get thrown away when stuff gets compiled.)

A better idea would probably be to search out source code on the web ... for example, Programmers Heaven has an area devoted to game source code in several different languages:
http://www.programmersheaven.com/zone8/mh82.htm
Of course you probably won't find code for anything like Commander Keen or Jazz Jackrabbit ... but if you're just getting into game programming, looking at the code for a game like that probably wouldn't help anyways. (Waaay too big & complicated.)

If you really want some big-ass source code for 'real' games, several companies have released code for some of their old games for free ... 3D Realms for example has released the code for Duke Nukem 3D, Rise of the Triad and Shadow Warrior. Check their site for info 'bout that. :thumbsup:
Owner / Webmaster of DOSGames.com for over 20 years

Download my free ebook: The Historical Reliability of the New Testament
Post Reply