Game Development Giant

Chapter 65 Jester’s Scroll Algorithm

After the chat between the two ended, Mark Saini, who was really sleepy, yawned and went to the lounge to sleep.

Jester sat on the chair where Mark Saini sat before, looking at the computer and thinking deeply.

He could indeed complete the scroll effect on a personal computer. He had seen Carmack's scroll algorithm before he was reborn. It was a very clever method that could complete things like this on a PC that was not suitable for gaming at the time. Arcade-like scroll animation effect, but...

Jester thought of something, which made him hesitate.

As we all know, PC games were born very early, but PC games really began to be accepted and could be compared in quality with those exquisite home consoles or arcade games, but it started after the birth of the Carmack scroll algorithm. .

Carmack's Scroll Algorithm is also one of the two milestones in the history of personal computers. Countless games in later generations, whether personal computers, arcades or home machines, have used this scroll algorithm countless times.

Moreover, these two milestones are related to Carmack. One is his scroll algorithm, and the other is the world's first true 3D engine he completed.

His initiative allowed gamers and makers to complete various ideas on the PC that they had dreamed of before but had no choice but to do. The first game on the PC that was not inferior to the home console in any aspect was precisely because of the Carmack Scroll. Born out of 1998, this game is also the ancestor of action-adventure games, "Prince of Persia".

When later generations read Carmack's biography, what Jester admired most about Carmack was that he was a real programmer.

The programmers mentioned here are not just coders who can code, but have infinite creativity and imagination, and can complete these into incredible programs, but they do not regard these programs as their own prohibitions. -Programmer.

Yes, Carmack is a firm open-source programmer. Every program he creates is non-patented and open-sourced for anyone to use. The most famous one is the one used in Valve's "Half-Life" Carmack wrote the engine for Quake without paying a licensing fee.

This is because after watching the demonstration of "Quake", G Fat, who was full of confidence at the time, discovered that they could not make a 3D engine that could achieve this effect anyway. It happened that a friend of G Fat was working at id He acted as Carmack's little brother, so he successfully obtained the Thor engine from id.

In this way, the most landmark work of FPS after "Quake" was released.

There's even a story about Carmack's scroll about his attitude toward open source programming.

Carmack was working at a gaming magazine at the time. He completed the scrolling effects and, with the help of a fellow artist, perfectly copied the first level of Super Mario onto a computer.

Then, his boss saw the game effects demonstrated by Carmack and just said this casually.

"Oh! You should apply for a patent."

Unexpectedly, Carmack immediately stood up from his seat, pointed his finger at his boss's nose, and then shouted nonstop: "Fuck that patent! If you dare to mention any patent to me again, I'll leave immediately!"

Not long after, Carmack actually resigned at the instigation of John Romero.

Therefore, Jester, a genius like Carmack, wants to use it but does not want to use it. He can indeed accomplish many things that other programmers dare not even think about. The problem is his special belief in open source programs. This is something that no game company boss can tolerate.

Can you tolerate the fact that the game engine your company finally developed is open sourced and can be used by everyone for free?

If Jester was a game enthusiast or an independent game producer, he would regard Carmack with this spirit as a god, but he is not now, although he once was.

Therefore, the tasks that Jester gave Carmack every time were only small games with unique ideas that did not require advanced programming skills. Moreover, he would apply for a patent for each game design plan and retain his correspondence with Carmack. It was to prove in the future that the copyright of these games belonged to him, and Carmack was just a coder he hired to help him complete these ideas.

Jester just sat in front of the computer, looking at the flashing fluorescent computer screen. He was worried about what impact it would have on the current game industry if he really made the first scroll game on the PC. .

Under the influence of Atari's impact, the home game console market was the most damaged, and was basically completely destroyed. Arcade machines were slightly less affected. Now, thanks to Jester's efforts, it has begun to gradually recover. But the one that was least affected, or basically not affected at all, was the personal computer game industry. Unlike Japanese designers, the countless European and American designers that Jester knew in his mind were all individuals of this era. It was honed by making games on the computer.

If you really launch a scrolling game a few years in advance, will it affect your plan to launch a home console in the future?

After thinking for a while, a mocking smile suddenly appeared on Jester's face, as if he was laughing at himself.

"I'm really a bit unfounded." Jester muttered. He was indeed a bit unfounded. In his later generations, when the quality of computer games could be compared with console games, and the performance of PCs was even better than that of consoles, the same It is difficult for the PC version of a full-platform game to sell for one-tenth, or even one-tenth, of the console version, let alone now.

We must know that in the future, the share of PCs will be dozens of times that of game consoles.

After thinking about this, Jester made his decision. After all, ATI is also his industry. Being able to let ATI dominate the market in advance will only benefit him and not hurt him.

However, Jester is not a programmer with utopian ideas like Carmack. He is the owner of a game company. Naturally, his scroll effect cannot be open sourced and used for free. Applying for a patent is naturally inevitable. natural thing.

After thinking about this, Jester was a little tired after driving for a day. His own lounge was occupied by Mark Saini, so he had no choice but to lie down on the sofa in Mark Saini's office with no clothes on. Reluctantly got some sleep.

the next day.

Jester called Mark Saini into the office along with two programmers from his development team who had worked with him the previous two days on how to complete the scrolling effect on the personal computer.

"How did you achieve the scroll effect?" Jester asked several people before formally explaining the Carmack scroll algorithm.

Mark Saini said simply: "At the beginning we wanted to directly replicate on the PC the methods we had already used on the arcade, whether it was drawing images directly on the screen or obtaining more memory to improve performance, but it was not possible. In reality, the reason is that the personal computer is too slow. Although it uses a 16-bit CPU, the PC board is different from that of the arcade machine. Its CPU cannot only be responsible for the calculation of our program. It has to process There are so many things.”

"Later we found that it is simply impossible to achieve the same effects as on arcade machines on a personal computer under the current circumstances, unless we are now using a 32-bit CPU and other supporting equipment. Memory, video memory, etc., so Laris and I gave up, except for the director." The person who spoke this time was a programmer named Brian, and he and the guy next to him with a beard named Laris The programmer is the main programmer in Mark Cerny's team, and they conquered the scroll effect of "Avengers".

At this time, Mark Saini emphasized something. He spread his hands and sounded a little frustrated: "I have to say that I haven't achieved any results in the past two days, so after you came back last night, I also planned to give up this Planned.”

"hehe."

Jester chuckled after hearing this.

He prepared his words in his mind, and then said, "Don't give up in a hurry. Let's first talk about how we achieve the scroll effect in the arcade. I've seen the engine package you made before, and it's roughly the same. I know a little bit about your thinking. It seems that this is what you do. When the character controlled by the player moves, if the character moves far enough to exceed the screen, in order to make the background move with the movement of the player, you The most direct way is to let the CPU redraw the pixels that make up the entire screen."

Mark Cerny and the three nodded, that's exactly what they did in "Avengers".

Seeing them all nodding in approval, Jester continued speaking.

"However, because this requires a large amount of calculations, in order to prevent the character's movements from being unsmooth in the calculation of constantly redrawing pixels, you have also come up with several very clever algorithms for this, but this It’s not the focus of our discussion this time, so I won’t talk about it, I’ll just talk about the redrawing of the scroll.”

As he spoke, Jester's tone became humble.

"Your programming level is better than mine. Logically speaking, I really can't do anything in front of you. However, I accidentally came up with an idea while sitting in front of the computer last night. Please listen to it first."

Mark Saini and the other two couldn't help laughing when they heard Jester's humble words.

"I was thinking, what do we want? - We want the graphics to move smoothly as the player moves through the game," Jester continued.

The three of them, Mark Ceny, were not impatient because what Jester said was all nonsense. They had all seen their boss’s whimsical ideas when designing games, and sometimes , designing an excellent program may sometimes just lack a wonderful idea.

Jester spoke quickly, but his enunciation was still clear.

"At that time, I remembered a method I used when designing an RPG game on the computer. In that game, when the character controlled by the player walked to the edge of the dungeon on the screen, I would make a big adjustment to the background. This kind of pixel-based scrolling is a very common technology, and what I want to do now is not a pixel-based scrolling, but a pixel-based scrolling. Even if the player only moves a little bit, the background needs to be adjusted accordingly. . But here’s the problem, I thought the same as you at first, but after I looked at the scroll animation program produced by Mark Saini, I found that this path is not feasible.”

Then, Jester saw that the faces of the three people became more and more serious, and the smile on his face became thicker, so + continued: "So, I changed my thinking mode - why should the computer be reset? How about painting the entire screen? Even though the background is changing every time the character controlled by the player moves, it is not that the entire background is changing, but only a small amount of the background is changing."

At this point, the smile on Jester's face disappeared and became serious. He was about to talk about the core of the Carmack Scroll.

"So what if instead of redrawing the entire screen every time, only the parts that actually changed were redrawn?"

As soon as Jester finished saying these words, the eyes of Mark Saini and the three of them all lit up. They already knew what Jester was thinking, and the three of them were also very talented programmers. They were almost there together. The answer to Jester's question came instantly.

What will happen?

Of course, there is no doubt that the calculation amount of the CPU will be only a fraction, or even a tenth, of the previous one, and the scroll effect will be executed much faster. To be precise, it is much faster.

Although there is no real program to verify it, the three of them also rely on their sensitivity to code to know that Jester's method may really be possible on a personal computer. Before, it could only be done on an arcade machine. That's it, scroll animation effect.

What a great idea.

This is the only thought in the minds of Mark Saini and the others at this time.

ps: Please vote for recommendation! !

Tap the screen to use advanced tools Tip: You can use left and right keyboard keys to browse between chapters.

You'll Also Like