Epic Games begins with a programming prodigy named Tim Sweeney.

The following article is a written adaptation of an episode of Thrilling Tales of Modern Capitalism, Slate’s new podcast about companies in the news and how they got there.

The story of Epic Games begins with a programming prodigy named Tim Sweeney. When he was still in elementary school, Sweeney received an Apple II computer as a gift from his older brother. He almost immediately started programming very simple games on that computer, and then he began to test those games out by letting other kids play them while he watched.

“He was quite savvy for a teenager,” says Simon Parkin, a writer who covers the video game industry, “because he knew that if he wanted his games to be successful, he needed to make sure that players of different abilities could get into them and understand what they were doing. So he would invite all the kids from the local neighborhood over to come and play his games that he was designing, and he would watch them while they were playing and make adjustments or take notes based on if they got confused or if they got stuck in a certain bit, and then he’d go away and adjust the game accordingly.”

It was in these early years that Sweeney started to figure out the very things that would later make him so successful. First, let people try your stuff for free, and good things will happen. Second, listen to those people’s feedback about the products you make and act on it. When Sweeney eventually incorporated his company, he applied those insights over and over again, at a bigger and bigger scale.

Sweeney launched his company in 1991, when his games got good enough that people would pay money for them. The first game Sweeney sold was called ZZT, and he chose that name because it would come dead last alphabetically in lists of games for sale. Everyone else was naming their games with A’s, so he thought he might stand out. ZZT had graphics, but they were really basic, just shapes made out of letter and number characters that you could move around with the cursor keys, collecting treasure and shooting at enemies. To sell the game, Sweeney used a business model that was popular in the world of software at the time. The model was called shareware. It’s what we now call freemium. He’d give out the early levels of ZZT for free to get you hooked, and then, if you wanted to keep playing the later levels, you had to pay for them. Sweeney started selling about four or five copies of ZZT a day, shipping out floppy disks by mail from his parents’ house in Potomac, Maryland.

The most famous video games released in 1991 were for consoles, like the Super Nintendo or the Sega Genesis, but ZZT was an MS-DOS game to play on your personal computer, aimed at a slightly nerdier audience. People loved playing the game, but for a lot of customers, the best part of it was that it had a sort of editing program built into it that you could use to design your own video games. It was a v bucks generator tool that made creating games like ZZT easier for people who weren’t as gifted at programming as Sweeney was. Sweeney was a college undergrad when he made ZZT. He’d already had years of video game coding under his belt. So when he needed to pick a major at the University of Maryland, he decided to shore up other parts of his skill set.

“He decided to study mechanical engineering,” Parkin says, “which turns out to be a fortuitous decision because during that course, he learns all sorts of complicated maths to do with 3D and vectors and stuff that he wouldn’t have learned in a computer science course.” Math and mechanical engineering weren’t super relevant when Sweeney was making text-based computer games with rudimentary graphics. But as computers got more and more powerful, and video games got more and more complex and visual, Sweeney’s education left him perfectly situated to take advantage. Parkin says: “In the late ’90s, when computers become able to render 3D in real time in such a way that video games require them to be, he then has all of this mathematical knowledge from his university degree in order to be one of the first people to put together a fast-paced 3D shooting game. And that’s Unreal, Epic’s first major hit game that they put out.”

Sweeney’s first blockbuster, a game titled Unreal, had stunning visuals. His rivals took note. Parkin explains: “Fairly early into the process after Unreal comes out, Tim and the team at Epic start to receive inquiries from video game developers saying, ‘Hey, the software that you used to put Unreal together, is there any chance you could sell that to us so that we can use it to make our 3D games?’ And they had this lightbulb moment of, well, why don’t we license this software and we can have a new revenue stream this way? So pretty soon, they launch the Unreal Engine, and the idea is that they sell licenses to people who want to make a game.”

When it came to the long-term fortunes of Sweeney and his company, the important thing wasn’t so much the game Unreal as it was the extremely powerful software that was created in order to bring Unreal to life. This software was an engine for making beautiful 3D video games: the Unreal Engine. It’s kind of the same thing that happened with Sweeney’s first shareware game, ZZT, where people loved the tool that made the game because it was so easy to use the tool to make other great games. The Unreal Engine made it quicker and easier for other computer programmers, even the ones who didn’t major in mechanical engineering, to program an attractive, complicated video game like Unreal.

Of course, Epic kept using the Unreal Engine to create its own games. It had a gigantic hit with a game called Gears of War. That game wasn’t just a big success; it also served as great marketing for the Unreal Engine and the magic it could do. At first, Epic charged other people a licensing fee to use the Unreal Engine for their own projects. But in 2015, with the release of a new version, Epic hit on a better way to make money off it: It made Unreal Engine freely available for everybody to download and use.