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:
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.
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.
您可能将控制台/终端(即由文本流和一些转义命令提供的纯文本窗口)与 DOS 计算机本身混淆了。控制台不是DOS,DOS也不是控制台。
控制台负责显示客户端应用程序通过输入和输出流发送给它的文本,向上滚动旧文本并静态显示它。控制台是图形硬件之上的一层,是操作系统的一项服务,您不需要它来显示图形。在 DOS 时代,程序会直接写入图形缓冲区,从而绕过您所看到的纯文本显示。
另一方面,今天已经存在控制台(例如 xterm 或 Windows 命令提示符),它们与 DOS 无关。
You are probably mixing up the notion of a console/terminal, that is, a text-only window fed by text streams with a few escape commands, with the DOS computer itself. The console is not DOS, and DOS is not the console.
A console takes care of displaying the text its client applications send to it via the input and output streams, of scrolling the old text up and statically displaying it. A console is a layer above the graphics hardware, and a service of the operating system, and you don't need it to display graphics. In DOS times, the program would directly write into the graphics buffer, circumventing the text-only display you see.
On the other hand, consoles exist today (such as xterm or the windows command prompt), and they have nothing to do with DOS.
The really old games were sometimes written in Assembler, as were the graphics libraries. But C/C++ was used a lot too.
I tried to write some graphics/game code too that time and I used C, Basic and Assembler. My favorite was the graphics mode '13' which was 320x200 in 256 colours. That graphics mode gave you two buffers of 64000 bytes, each byte representing a pixel on the screen. One buffer for drawing, one buffer that was displayed.
This very efficient mode, allowed you to easily plot pixes (each pixel being a byte). Because of the size of the screen, you could easily find the right pixel by bitshifting the Y coordinate and adding up X. Because of the two buffers, you could draw in the background, and swap a 'display pointer' when you wanted to draw the next frame.
But I admit, this was already a VGA mode. I haven't had much success with the really old graphics card. CGA was harder, and writing to the Hercules Graphics Adapter was really cumbersome and I never got the hang of it.
发布评论
评论(4)
汇编语言、Pascal 语言和 C 语言都是流行的语言。图形是通过直接与显示硬件连接生成的,例如彩色图形适配器。 (CGA)
可能有库,但不像今天,而且库通常不共享在公司之外。
可以在这里找到与 1988 年相关的资源:
https://web.archive.org/web/20170910230837/http://gd.tuwien.ac.at/languages/c/programming-bbrown/advcw1.htm
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
那个时代的游戏通常直接写入图形硬件。它们映射到内存中的特殊位置,并像数组一样直接操作像素。
声音和网络驱动程序库很常见。我不知道哪些 - 如今,由于 硬件抽象层由操作系统本身提供。
除此之外,还有C/C++语言标准库。直到那个时代之后,游戏中间件库才变得如此普遍。
中间件的示例有:
然而,在 DOS 时代,游戏引擎。那天的例子包括:
C 和汇编非常常见。
更罕见的是Pascal,或者更多其他更晦涩的语言。
如果您想像 DOS 时代那样开发低级软件,那么为旧游戏系统编程可能是个好主意。 NES、C64、Gameboy 和 Gameboy Advance 编程都要求作者使用直接硬件访问,并要求您了解 C 或某种形式的汇编。您可以使用模拟器来运行和调试成品,因此它的进入门槛不像当前的控制台那么高。
如果您只想开发 DOS 风格的游戏,现在有很多图形和声音库可供您使用。我建议使用其中一个库,而不是像他们那样做事情。 Allegro, SDL,PyGame,OpenAL 和 OpenGL 等等。
您仍然可以进行低级图形编程,但您的游戏运行速度会更快,在出现问题时将获得更好的技术支持,并且您的游戏将是跨平台的。
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.
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:
The DOS days were, however, the popular birth of the Game Engine. Examples from that day include:
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.
您可能将控制台/终端(即由文本流和一些转义命令提供的纯文本窗口)与 DOS 计算机本身混淆了。控制台不是DOS,DOS也不是控制台。
控制台负责显示客户端应用程序通过输入和输出流发送给它的文本,向上滚动旧文本并静态显示它。控制台是图形硬件之上的一层,是操作系统的一项服务,您不需要它来显示图形。在 DOS 时代,程序会直接写入图形缓冲区,从而绕过您所看到的纯文本显示。
另一方面,今天已经存在控制台(例如 xterm 或 Windows 命令提示符),它们与 DOS 无关。
You are probably mixing up the notion of a console/terminal, that is, a text-only window fed by text streams with a few escape commands, with the DOS computer itself. The console is not DOS, and DOS is not the console.
A console takes care of displaying the text its client applications send to it via the input and output streams, of scrolling the old text up and statically displaying it. A console is a layer above the graphics hardware, and a service of the operating system, and you don't need it to display graphics. In DOS times, the program would directly write into the graphics buffer, circumventing the text-only display you see.
On the other hand, consoles exist today (such as xterm or the windows command prompt), and they have nothing to do with DOS.
真正古老的游戏有时是用汇编程序编写的,图形库也是如此。但 C/C++ 也被大量使用。
当时我也尝试编写一些图形/游戏代码,我使用了 C、Basic 和汇编语言。我最喜欢的是 图形模式“13”,分辨率为 320x200,256 色。该图形模式为您提供了两个 64000 字节的缓冲区,每个字节代表屏幕上的一个像素。一个用于绘图的缓冲区,一个用于显示的缓冲区。
这种非常高效的模式使您可以轻松绘制像素(每个像素都是一个字节)。由于屏幕的大小,您可以通过对 Y 坐标进行位移并将 X 相加来轻松找到正确的像素。由于有两个缓冲区,您可以在后台进行绘制,并在需要绘制时交换“显示指针”下一帧。
但我承认,这已经是VGA模式了。我在非常旧的显卡上并没有取得多大成功。 CGA 更难,而且写入 Hercules 图形适配器真的很麻烦,我一直没有掌握它的窍门。
在这里你可以找到一些旧的 DOS 游戏,包括源代码(都不是我的):
http://www.classicdosgames.com/misc/source.html
The really old games were sometimes written in Assembler, as were the graphics libraries. But C/C++ was used a lot too.
I tried to write some graphics/game code too that time and I used C, Basic and Assembler. My favorite was the graphics mode '13' which was 320x200 in 256 colours. That graphics mode gave you two buffers of 64000 bytes, each byte representing a pixel on the screen. One buffer for drawing, one buffer that was displayed.
This very efficient mode, allowed you to easily plot pixes (each pixel being a byte). Because of the size of the screen, you could easily find the right pixel by bitshifting the Y coordinate and adding up X. Because of the two buffers, you could draw in the background, and swap a 'display pointer' when you wanted to draw the next frame.
But I admit, this was already a VGA mode. I haven't had much success with the really old graphics card. CGA was harder, and writing to the Hercules Graphics Adapter was really cumbersome and I never got the hang of it.
Here you can find a couple of old DOS games including source (none of them are mine):
http://www.classicdosgames.com/misc/source.html