How were games developed 20 years ago?

How were games developed 20 years ago?

[[145405]]

Someone asked on Zhihu: "There are many geniuses in Tieba who can use engine to write games at the age of 15 or 16. What do you think?" I feel that making games is a really happy thing now, and I can't help but think of the various hardships in developing games back then.

It is very easy to make games now. There are a lot of codes for you to refer to and a lot of frameworks for you to use. Windows helps you do most of the things. When we were writing games at that age, there was no Internet at home, no information could be found, and no open source engines existed. If you wanted to write a game around 1995, you would at least face the following challenges:

  • When dealing with graphics cards, there is the famous ModeX display mode of graphics cards. I guess few people have heard of it now. It directly writes to the graphics card port and requires many tricks to initialize successfully.
  • Directly access video memory. I remember that there was an optimization back then: ((char*)0xa0000L)[x + (y << 8) + (y << 6)]=c, which was to shift y left twice and add them instead of y * 320.
  • Use a palette to draw, a 256-color palette, and create several index tables to quickly index the results of mixing two colors.
  • Protected mode programming, initializing GDT and LDT by myself, and later found dos4gw, the awesome watcom c++.
  • Implement the thread yourself, program the 8254 clock controller, send an interrupt to the CPU's IRQ0 to schedule up to 32 different tasks, and switch them when the time comes.
  • Control the sound card yourself through port 220 (probably not many people have used it before), and then use DMA to transfer audio to achieve sound playback.
  • To implement mixing yourself and play multiple sound sources at the same time, you need to resample them into the sound card format and send the mixed sound to the sound card every time DMA interrupt occurs.
  • Play music by yourself, use the FM Synth synthesizer of the sound card port 338 to play the instrument notes of different tracks in MIDI music, and use the previously implemented thread system to run in the background thread.
  • A lot of assembly code, graphics copying, tile scaling, RLE, graphics card control, polygon filling, keyboard interrupt takeover.
  • Draw your own font, HZK16, I guess not many people have heard of it.
  • Read images by yourself, GIF, PCX, BMP.
  • Play the video by yourself, and decode and play the FLC video format output by animator and 3ds.
  • Implement the script yourself, no LUA, no PYTHON, but you need to implement scripts for your game to describe some simple plots. You have never seen how other games are done, and without any reference code, you realize that game development requires scripts to improve efficiency, and then implement a script system yourself.
  • Implement a game out of thin air, without ever seeing any game code, think about how to write the state machine, how the game objects should move simultaneously, how to do front and back occlusion of the image, and how to write various game logics.
  • To study art design, even if you have no art background, you have to be proficient in using the commonly used animator, 3ds, and other software at the time, and make some simple interfaces and characters by yourself. You can also perform secondary processing on other pictures, draw pixel pictures, and merge color palettes.

—————————
Remember, when there was no Internet and not as much open source software as there is now, the books in bookstores were basically all about using C language to call BGI for drawing, with occasionally one or two books on the principles of graphics cards, and occasionally one or two books on the principles of sound cards. You would have found a treasure if someone published an article in "Computer News" or "Programming Skills and Maintenance" to teach you the principles of FLC video animation format, you would be overjoyed.

Remember, you didn't have any friends online or to communicate with, and you had to observe carefully, guess, and repeat experiments to complete many things. I remember that I was surprised by the effect of "Chinese Paladin" in 1995. I didn't know how to display the image at a 45-degree angle, and how to deal with the occlusion relationship. There was no one around to ask, and then I thought about it and found that I could sort the objects by (x+y). I experimented and it worked. I remember that when I was in elementary school in 1992, I wrote a game. In the past, programming was done one by one from beginning to end. I couldn't figure out how more than ten planes could fly at the same time. There was no multitasking at that time, and I hadn't realized the simulation task system. I racked my brains. One day, I saw in a book that the logic of the UNIX time-sharing system was that each task ran for a short period of time and then switched. Following this idea, I finally figured out the so-called state machine model. When processing each plane in each frame, it moved a small step according to the current state, then updated the state, and then processed the next plane. Then I ran to the computer excitedly, coded all day, and finally realized it. Then I invited my classmates to my house to play. Seeing them so excited while playing, I suddenly felt how pleasant it was to create games.

Back then, making a game almost required writing half an operating system. You were the only one in the city who was researching these things. The teacher only taught NOI, and the books only taught you how to draw with BGI. There was no game development-related book published. The key point was that you were still in middle school, and you had never learned composition principles, compilation principles, or computer graphics. You relied on a few broken books in bookstores, bits and pieces in magazines, and self-understanding. Compared with today's children, Windows has done so many things for them. They can buy a book and follow the book to draw triangles, import models, manage scenes, and check collisions. If they don't understand, they can ask Zhihu. If they don't understand, they can just go to gamedev.net. If they can't write a game, they can copy other people's code. Scripts can use lua and python. It's like being born in heaven. What's there to praise?

The industry will always develop, and I have also acquired a lot of knowledge from "Programming Skills and Maintenance", "VGA Display Principles" and various magazines. The people who wrote these articles and the computer people around me were much older than me. There was always an impulse in my young heart, and I felt that I would definitely surpass them in the future. This is not because I look down on them or I am arrogant, but only in this way, standing on their shoulders, can I live up to this industry that we all love and the career that we all pursue.

Today, I will try my best to use my spare time to train game development everywhere and help everyone how to realize various things. My only goal is to enable today's children to surpass me one day in the future. It is not because they are arrogant or I am self-deprecating, but because only in this way, letting them stand on my shoulders can we live up to this industry that we all love and this career that we all pursue.

<<:  7 Things Your Boss Doesn't Know About Software Development

>>:  Sorry, I don't like programming, I like creating

Recommend

Does water have a color? Why is swimming pool water blue?

Today's Tadpole Quiz is here! The above is @A...

Summary of Swift basic grammar learning

1. Basics 1.1) Swift still uses // and /* */ for ...

Practical Tips | Shopping Routes: A Concept That Operators Must Know

Over the years that I have been engaged in e-comm...

Expert interpretation | Is artificial intelligence a master key to the future?

The fourth industrial revolution is approaching. ...

5 Steps to Write a Hot Article with 100,000+ Reads (Part 2)

The main thread of this article is the content and...