Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How were graphical DOS Games written? [closed]

Tags:

graphics

dos

I always wondered how the DOS games like Sky Roads, Turbo, Aladdin, Duke Nukem, Commander Keen 6 were written. I cannot find a good source. If I write a console application in C#, C++, Java etc.. It is always displayed and remains still. And it is always Text.

  1. How did they generate graphics?
  2. Were there any libraries to use?
  3. What languages they used?

Any good source will be appreciated.

like image 905
Mustafa Avatar asked Sep 18 '11 09:09

Mustafa


People also ask

What are DOS games coded in?

What languages they used? C and assembly were extremely common. More rarely Pascal, or more other more obscure languages. If you want to develop low-level software like was done in the DOS days, programming for an old game system might be a good idea.

When did they stop making DOS games?

Beginning in 1988 with DR-DOS, several competing products were released for the x86 platform, and MS-DOS went through eight versions, until development ceased in 2000.

Can you still play DOS games?

You can still run DOSBox and your favorite DOS-based games. It's free, and that's always a plus. It runs older games exactly as they should be. Instead of just emulating a game to run on newer systems, DOSBox emulates the original environment so the game runs as smoothly as it did originally.


2 Answers

Assembler, Pascal and C were popular languages. Graphics were generated by directly interfacing with the display hardware, for instance the Color Graphics Adapter. (CGA)

Probably there were libraries, but not like today, and libraries were often not shared outside a company.

A resource which would have been relevant in say, 1988, can be found here:

https://web.archive.org/web/20170910230837/http://gd.tuwien.ac.at/languages/c/programming-bbrown/advcw1.htm

like image 98
Prof. Falken Avatar answered Sep 23 '22 01:09

Prof. Falken


How did they generate graphics?

Games from that era usually wrote directly to the graphics hardware. They mapped to a special place in memory, and directly manipulated pixels as if they were an array.

Were there any libraries to use?

Sound and network driver libraries were common. Which ones, I don't know - these days you wouldn't have to provide drivers along with your game due to the Hardware Abstraction Layer provided by the OS itself.

Besides this, there were the C/C++ language standard libraries. Game middle-ware libraries didn't become as common until after that era.

Examples of middle-ware are:

  • Physics libraries such as Havok
  • Image format loader libraries such as DevIL
  • Sound format loader libraries such as FMOD
  • Video handler libraries such as Bink

The DOS days were, however, the popular birth of the Game Engine. Examples from that day include:

  • Scumm
  • Build
  • Doom
  • Quake

What languages they used?

C and assembly were extremely common.

More rarely Pascal, or more other more obscure languages.


If you want to develop low-level software like was done in the DOS days, programming for an old game system might be a good idea. NES, C64, Gameboy and Gameboy Advance programming all require the author to utilize direct hardware access, and require you to know C or some form of assembly. You can use an emulator to run and debug your finished product, so it isn't as high a barrier to entry as current-gen consoles.

If you just want to develop a DOS-style game, these days you have a lot of graphics and sound libraries available to you. Instead of doing things exactly like they did, I recommend using one of those libraries. Allegro, SDL, PyGame, OpenAL, and OpenGL to name a few.

You will still be able to do low level graphics programming, but you will get your game running much faster, will have better tech support when things break, and your game will be cross-platform.

like image 41
Merlyn Morgan-Graham Avatar answered Sep 20 '22 01:09

Merlyn Morgan-Graham