Game Hacking

Game Hacking

John Carmack once said, "In the information age, objective barriers no longer exist. All so-called barriers are subjective. If you want to develop new technology, you don't need millions of dollars in funding. You just need to fill the refrigerator with pizza and Coke, a cheap computer, and the determination to devote yourself to it." This is true when he made games, when he played rockets, and it must be even more true when he developed virtual reality technology. "We slept on the floor and waded through the river."

Carmack is not the hacker in Steven Levy's book. He grew up to be a hero by reading Levy's book "Hackers: Heroes of the Computer Revolution" published in 1984. He is a game hacker, a rocket hacker... More importantly, he has long been a symbol of all technical people.

It is natural to understand Carmack's story with the hacker ethics summarized by Levy in the book. In 1996, hacker master Eric S. Raymond wrote a more systematic introductory document for the hacker circle. Here we might as well use this hacker document, "How to Become a Hacker", which has been kept updated, as a reference to further understand Carmack's story and hacker culture.

First of all, it’s attitude.

⒈The world is full of fascinating problems waiting to be solved.

As a hacker, you get motivated by the pleasure of solving problems, honing your skills, and exercising your intelligence. (You also have to have faith in your ability to learn—the belief that, although you may not know enough to solve your current problem, once you start with a small part of the problem and learn from it, you will learn enough to solve the next part—and so on, until the whole problem is solved.)

Carmack's approach to solving problems is exactly this: "Try the most direct approach first, and if that doesn't work, then broaden your ideas." When developing the technology of perspective 3D images, he finally used the so-called "ray tracing" algorithm in a unique way. This belief in solving problems was undoubtedly more obvious when he was developing the Quake game engine and met Michael Abrash, a leader in the computer graphics industry. The section that impressed Abrash is described as follows:

Like other programmers in the graphics field, he (referring to Abrash) often described virtual worlds in theory. When he read the "variants" in Snow Crash, he thought, I can already achieve 80% of this, at least in theory. And now, a young man who is only 24 years old but full of confidence is sitting in front of him, talking about making it a reality. Abrash has no doubt that he can do it. Later, Abrash talked about how he always doubted whether he could go further after finishing a project. Hearing this, Carmack frowned: "I never doubted it, huh."

⒉No problem should ever have to be solved twice.

As two veterans of game modification, Carmack and Romero are very happy that players are willing to modify and replace the game data of Wolfenstein 3D. In fact, open, free and fun game modification helps developers and the player community to promote each other and form a healthy interaction. Since Doom, Carmack has been actively doing the "right thing" for players and making the game easy for players to modify.

To this end, Carmack specifically released the source code of the Doom level editor and other auxiliary tools. Then, Brendon Wyber of the University of Canterbury in New Zealand separated various functions from the source code like a butcher's knife, and with the help of players from all over the world, he created the Doom editing tool - DEU: Doom Editor Utility, which shows players how to build a level from scratch. Ten days later, the enhanced version of DEU produced by Belgian student Raphael Quinet and Brendon was released - "You can do almost anything in the level. You can move, add, and delete various monsters and treasures, change the position of the wall, or change its wallpaper, or install new elevators, doors, and acid pools. You can also adjust the height of the ceiling... even build a whole new level." Greg Lewis, a student at the University of Michigan, went a step further. The DeHackEd software he wrote can modify not only the external WAD files containing images, sounds, and levels, but also the core of the game - the executable file, which contains the operating logic of the game, such as how monsters move, how weapons fire, and how text is displayed.

This kind of editor later became a standard feature of other companies' games, such as Blizzard's "Warcraft" and "Starcraft", and the famous "Counter-Strike" is a modification package of "Half-Life", and the world-famous "DotA" is just a custom map of "Warcraft 3". The effect of "no need to reinvent the wheel" is obvious.

⒊Boredom and drudgery are evil.

"Dull and monotonous work is not only unpleasant, but also a sin in itself." Carmack said from his experience that this is even more true of school education. It is a sin to let creative minds be troubled by stupid repetitive labor, and it is a greater sin to let creative minds be imprisoned by assembly line-style education factories.

From the time he started to work with computers and Hackers, Carmack entered a different world. There, he and his friends spontaneously learned BASIC programming, played games together, and researched and modified games together, without having to rely on others. Through the BBS (Bulletin Board System) and WELL (Whole Earth 'Lectronic Link) at the time, Carmack further learned about games and hacker culture, and of course some fun but less legal things, such as stealing telephone lines and explosives formulas.

One night, when Carmack and his friends used thermite they had just learned to melt the glass of a school's computer room, someone accidentally triggered the alarm of a nearby police station, and they were soon surrounded... 14-year-old Carmack was sent for a mental evaluation to determine his confession. His interview with the psychiatrist was not smooth, and he was sentenced to one year of reeducation. In the "juvenile home" in the city, everything is done according to a schedule: eating, bathing, taking a walk, sleeping, and a small red flower for completing a housework. Every morning, all children are loaded into a truck and transported to school for class, and then taken back to the "juvenile home" after school. Our social system has not yet evolved a reasonable response mechanism when facing creative minds. So far, it is more inclined to first prevent these creative minds from doing bad things, and more often simply to imprison them. This itself is a kind of evil to human nature, and it is more conducive to becoming a society where wrong views prevail.

So Carmack hated school—hated the system and dogma. In the fall of 1988, at the University of Kansas, Carmack took all computer-related courses. On the back of a test paper, he wrote to the professor: "Why can't you give us a project to do? I can make whatever you want!" After enduring two semesters, he dropped out. Later, when "Doom" became a big success, Carmack bought $3,200 of computer equipment and gave it to his computer teacher when he was studying at Shawnee Church Public School, "so that they can learn knowledge in practice, instead of studying by rote." He explained.

⒋Freedom is good.

Carmack was faced with his mother's authoritarian behavior: "If a person wants to enter the computer industry, he should first go to college - preferably MIT, then get a degree, and then enter a company - preferably IBM. Therefore, she refused to let her son spend the money on things that she thought were ridiculous - especially making games." She loved her son, but she only wanted him to do what she thought was right. She refused to let her son spend money on things that she thought were ridiculous - especially making games, even though the money was a trust fund left to Carmack by his father. She stubbornly believed that the money could only be used for college, and that she would only return the money to him after her grades satisfied her. Before that, Carmack had to pay for his tuition.

So for a long time after graduating from high school, Carmack had a very bad relationship with his mother. After dropping out of school, Carmack began to devote himself to making games, while working part-time in a pizza shop to support himself. Carmack's struggle was recognized by Nighthawk Company for his game. Although the sales were mediocre at the beginning, he was able to invest the money he earned in another hobby - modifying cars. With free time, without having to listen to others' orders or answer others' questions, Carmack was happy to spend his life writing programs, modifying cars, and playing "Dungeons and Dragons" - it was that simple.

To do that, he just needs to make more games.

Why is freedom so crucial to a mind like Carmack's? Because "anyone who can give you orders can force you to stop working on any problem that fascinates you—and, in the manner of authoritarian minds, he will usually give some extremely stupid reasons." This goes back to the point above that wasting a creative mind on stupidity is a sin.

⒌Attitude is no substitute for competence.

Carmack believes that the hacker ethic is not a distant concept or a programmatic manifesto, but a real way of life. Imagine this scene: after watching "Hackers: Heroes of the Computer Revolution", a 14-year-old boy lies in bed at night, and the only thought in his mind is - "I'm supposed to be in there!"

In the third grade, Carmack immersed himself in the world of Dungeons & Dragons. Unlike other dungeon lords who were bound by the rigid terms in the rulebook, he threw away those structures to create his own world - every day after school, he locked himself in the cabin and buried himself in piles of drawings and tables.

This process is just as ESR explained in the article: "You can learn the characteristics of programming languages ​​from books - but that is just the surface of knowledge. It is the concepts in your mind that turn this written knowledge into real and usable skills, and this process can only be learned through continuous practice and humble apprenticeship. So what you can do specifically is (a) read code and (b) write code."

Instead of simply playing for fun, Carmack began to study and modify the game. This was the starting point for him to become a game hacker. "Once, Carmack found the code for handling characters in Genesis. With a little modification, he added some extra abilities to himself. This was the first time he experienced the joy of creating something out of thin air." Moreover, "as a programmer, he does not need to rely on others. As long as his code logic correctly expresses the rules he defines, it will work well and everything will make sense."

Carmack discovered that what he loved most was graphic programming: creating some binary code and watching it come to life on the screen; the satisfaction brought by this direct feedback was not available in other programming jobs... He also realized that if he wanted to explore the world of programming further, he had to start with games. He was not the kind of person who sat and waited for inspiration, so he directly used ideas from existing games. Shadowforge was his first game, which was very similar to Genesis, but it also had several unique innovations, such as the player being able to attack in any direction.

Nite Owl Productions, a company that specializes in camera batteries, bought Photography for $1,000, which was Carmack's first income. He used the money to upgrade his Apple computer to the Apple II GS.

What's more important is skills.

⒈Learn how to program.

Carmack wrote in his February 1998 .plan file:

My life is divided into different stages based on the accumulation of knowledge and the continuous deepening of learning.

I started out using an Apple II computer at school, but the conditions at the time limited my learning speed and depth. Today, the situation is much better. As long as you have a cheap second-hand PC, a Linux CD and an Internet account, you have enough tools and resources to achieve any programming level you want.

The first six months of "Floppy Disk" were like a dream for me. For the first time in my life, I was surrounded by programmers who were more knowledgeable than me (Romero and Lane Roath), I had a lot of books and materials at hand, and I could devote myself to programming. It was a really good time.

Over the next two years, until Doom and several home console versions were ported, I steadily improved my knowledge and skills, including: more in-depth graphics programming, networking, Unix, compilation principles, cross-platform, RISC architecture, and so on.

The first year of Quake development was like a whirlwind. With Michael Abrash as a consultant, I was able to try a lot of new topics. If the professional graphics programmers knew how amateur I was when I wrote Doom, they would be shocked. At that time, I couldn't even clip wall polygons correctly (that's why I used that weird polar coordinate system). Quake forced me to stay on the right track and explore new ideas at the same time.

The last six months of Quake's development were spent in agony, as all I could think about was getting the damn thing done. Of course, it all paid off in the end, but I don't miss that time at all.

During the development of Quake2, my learning experience was further expanded: GLQuake, quakeworld, radiosity, OpenGL tool development, Win32 programming, etc. At the same time, I also had a lot of ideas about what to do next.

I think the next Trinity engine will be as fruitful as Quake. I have a very deep understanding of some topics, and I am also trying some new areas outside of graphics programming, which will interact positively with all my other work.

⒉Get one of the open-source Unixes and learn to use and run it.

Unlike today, Carmack was exposed to the TRS-80 computer in Radio Shack's computer training class in fifth grade. The TRS-80 series Model I was released in August 1977. The operating system was just a ROM-based BASIC language environment. For more details, see http://oldcomputers.net/trs80i.html. (Most home computers in the 1980s had a BASIC interpreter resident in ROM, which allowed the computer to boot directly into the BASIC environment. Because of the rise in BASIC's popularity during this period, some magazines published complete code for games, tools, and some other programs written in BASIC. http://zh.wikipedia.org/zh-cn/BASIC)

This was the learning environment when Carmack began to teach himself BASIC programming, research and modify games. The first public BBS system (Bulletin Board System) written by Ward Christensen and Randy Seuss spread rapidly after it went online in 1978. Countless BBS systems were set up, some of which, like Stewart Brand's The WELL (Whole Earth 'Lectronic Link), became a hotbed for hackers or players like Carmack. They not only studied games here, but also discussed hacker culture, and even embezzled telephone lines and explosives... The most important point, I think, was that these early virtual communities made Carmack realize that what he wanted to learn and what he wanted to do were actually no longer within the school system.

Later, 14-year-old Carmack was sentenced to one year of reeducation for using thermite as explosives to steal an Apple computer, and his desire to delve into technology made his parents finally agree to buy an Apple computer - an Apple II, with a ROM-based Wozniak version of BASIC. The first game he made with this computer, Shadowforge, brought him $1,000 in income, and he used the money to replace the computer with an Apple II GS running Apple GUI and ProDOS.

For Carmack, computers and their operating systems were nothing more than things to study. He read the encyclopedia's description of computers dozens of times, just to teach himself everything he wanted to know. As a hacker, he enjoyed and gained motivation from solving problems, honing his skills, and exercising his intelligence.

Many years later, at the end of the production of Wolfenstein 3D, he spent $11,000 to buy the latest NeXT computer released after Jobs left Apple for game development. The NeXTSTEP system was based on the Mach microkernel and BSD Unix. After NeXT was merged into Apple, the system developed into the Darvin core of today's Mac OS X. The biggest difference between this and today's OS X is the latter's proprietary Aqua GUI. In addition, coincidentally, the world's first World Wide Web server was set up by Tim Berners-Lee on a NeXTCube, and the first web browser WorldWideWeb was also developed on this system, which just mentioned our next topic.

⒊Learn how to use the World Wide Web and write HTML.

Learning to use the World Wide Web does not just mean using a browser, but learning to write HTML, which also teaches you some habits of thinking that are helpful for learning programming. And to be valuable, the web pages you write must have content - interesting and/or useful content for other hackers. Only in another article "The Wisdom of Asking Questions" did ESR explain in great detail how to ask questions and answer them on the Internet and learn from them. For more general network use, you should combine Howard Rheingold's "Network Literacy" and make full use of the Internet to organize your own learning network.

Speaking of making good use of the Internet, Carmack and his team's business story of distributing games in the form of shareware through the BBS system is equally amazing. With the success of "Commander Keen", in February 1992, Sierra Online reached an acquisition intention with id Software for $2.5 million. Unfortunately, the Williams couple failed to understand what Carmack and his team were doing, especially failed to realize the potential of "Wolfenstein 3D", and ultimately they failed to give id the cash transaction they hoped for... This was a direct confrontation between two generations of game hackers, and the result was that id's "Wolfenstein 3D" was a great success and soon became an underground cultural phenomenon.

On Friday, December 10, 1993, after thirty hours of continuous testing, id was ready to upload Doom to the Internet. David Datta, the system administrator at the University of Wisconsin, kindly provided id with a file server on the campus network. Nearing midnight, the server was crowded with impatient players, who were very clever in creating new files and using the file names to communicate their feelings at that moment, but the protagonist of the night, id, could not log in to upload the game file because the server was full. Finally, id had to rush into the chat room to persuade the players - "You choose, either you leave and I will upload "Doom", or I won't upload it." Half an hour later, the moment the last byte arrived at the server, tens of thousands of players flocked to it, and the University of Wisconsin's network was paralyzed... The Internet had never seen such a scene at that time.

From "Commander Keen" to "Wolfenstein 3D" to "Doom" and "Quake", Carmack and his team are well versed in the online way of sharing software: upload it first, let the players download it, and then they will continue to spread it. This is much better than other expensive distribution methods. Players are equivalent to helping id a lot.

⒋If you don't have functional English, learn it.

In addition to games and code, Carmack also shares his own experiences and ideas that are interesting and/or useful to other hackers. The most famous of these is the .plan file, which is a file in the UNIX user's root directory used to store user information and recent planned tasks. The finger program can be used to display the .plan file of a specified user. id originally communicated with players by publishing .plan files. From 1996 to 2010, Carmack alone published at least 394 .plan files. This is a first-hand source of information to learn from Carmack. A detailed archive can be found at http://floodyberry.com/carmack/plan.html.

In addition, from 1999 to 2008, Carmack was active on the technology website Slashdot. An archive of 101 messages he posted during that time can be found at http://floodyberry.com/carmack/slashdot.html.

If you're still interested in watching Carmack's previous keynotes, here's an archive of some of them. Here's also a video of his keynote from last year's Oculus Connect developer conference as CTO.

There is also an archive of some of his interviews.

Here is a Github project that organizes and archives Carmack's related information, and here is his original official blog. Just like Linus Torvalds' example of managing the global Linux developer community, John Carmack's thinking and expression of details on technology are also worth learning.

Other factors include social status and personal style.

Write open-source software.
Carmack has contributed to open source projects such as the X Window System for Mac OS X Server and the Utah GLX project, an OpenGL driver for Linux, as well as the open source games and engines of id Software.

id Software’s open source projects are available at https://github.com/id-Software. The technologies developed by Carmack include:

Adaptive Tile Refresh (for Commander Keen)

Raycasting (used in Hovertank 3-D, Catacomb 3-D and Wolfenstein 3-D)

Binary Space Partitioning (used in Doom and Quake series)

Surface caching (used in the Quake series)

Carmack's reverse (an algorithm used for Doom 3 shadow volumes)

MegaTexture (for Rage)

This is the most important and traditional hacker technique.

Read science fiction.
In addition to science fiction movies, comics and games, Carmack also read fantasy works such as "The Lord of the Rings" since he was a child, but he prefers to be the lord of "Dungeons & Dragons" and create his own world.

Train in a martial-arts form.
Carmack practiced weightlifting, judo, and wrestling. This did not have a direct impact on him, but it was a good exercise for his future self-discipline and control.

Car modification was another major hobby of his. Carmack used the $2,000 he earned from his second game, Wraith, to modify his then-brown MGB.

Later, the huge sales of "Wolfenstein 3D" allowed the 22-year-old Carmack to own his first Ferrari, a cherry red 328 sports car worth $70,000 - just another machine to be used for research: with the help of motorcycle veteran Bob Norwood, they added a supercharger and turbocharger to the engine, and finally $15,000 was exchanged for a speed of 140 miles per hour, which made Carmack very happy.

The success of Doom earned Carmack a second Ferrari, a $90,000 Testarossa, this time with a pair of turbochargers that tripled the horsepower to 600. The experience was crucial in helping him regain his love of rockets during the development of Quake 3.

Then, Rocket Hacker

When Carmack learned that hackers, engineers, and enthusiasts were building large, high-energy launch vehicles to enter outer space, he bought thousands of dollars worth of books and articles on the subject and began to educate himself. This was the starting point of Armadillo Aerospace.

The goal of the enthusiasts was the $10 million "X Prize" - to send three passengers into outer space. Unfortunately, Armadillo Aerospace lost to SpaceShipOne, sponsored by Paul Allen, in its first "X Prize" competition; but in NASA's Lunar Lander Challenge, Carmack and his team won the first place in Level 1, which was worth $350,000, in October 2008, and the second place in Level 2, which was worth $500,000, in September 2009.

In 2010 and 2011, Armadillo Aerospace developed the Super Mod VTOL rocket as part of the NASA Flight Opportunities Program's reusable suborbital launch vehicle test. In late 2010, Armadillo Aerospace began developing a larger version of the Super Mod, the STIG. Unlike SpaceX's Grasshopper rocket, the STIG rocket failed to achieve its intended purpose on its second launch in January 2012 and its third launch in January 2013. Meanwhile, the entire project has exhausted Carmack's personal investment of millions of dollars.

In August 2013, with the failure of STIG-B, Carmack announced that Armadillo Aerospace entered hibernation mode and actively sought external investors. (In the same month, he joined Oculus VR as CTO and finally left id at the end of November.)

By May 2014, several former employees of Armadillo Aerospace had formed a new company, Exos Aerospace, in order to transform Armadillo Aerospace's research results into reusable commercial spacecraft. They still used the original Armadillo Aerospace research facility in Texas.

Finally, the Zen poem quoted by ESR is also applicable to our view of John Carmack as a symbol of a technical person.

To follow the path:

look to the master,

follow the master,

walk with the master,

see through the master,

become the master.

As a winner of Toutiao's Qingyun Plan and Baijiahao's Bai+ Plan, the 2019 Baidu Digital Author of the Year, the Baijiahao's Most Popular Author in the Technology Field, the 2019 Sogou Technology and Culture Author, and the 2021 Baijiahao Quarterly Influential Creator, he has won many awards, including the 2013 Sohu Best Industry Media Person, the 2015 China New Media Entrepreneurship Competition Beijing Third Place, the 2015 Guangmang Experience Award, the 2015 China New Media Entrepreneurship Competition Finals Third Place, and the 2018 Baidu Dynamic Annual Powerful Celebrity.

<<:  After several rounds of reshuffles, will the online video industry landscape change in 2015?

>>:  How far are video sites from profitability?

Recommend

Take these tips on increasing followers on Douyin!

It has been a while since TikTok rose to prominen...

B station advertising account opening process, B station advertising display

The information flow ads on Bilibili are placed a...

Cultural Relics + 928 Sets! World-class Major Archaeological Discovery →

About 150 kilometers southeast of Sanya City, Hai...

Douyin short video APP competitive product analysis report!

background: As a new product manager of Tencent&#...

How early was the earliest hot pot? Much earlier than Yao, Shun and Yu!

Frost has passed, is the beginning of winter far ...

I went to Dunhuang to check in and found that Crescent Lake has become "fat"?

Science Times reporter Hu Lijuan With the Nationa...

Talk about the merchant operation system (Meituan Dianping)

The establishment of an operating system involves...

"Super Moon" appears tonight!

Your browser does not support the video tag Xinhu...