Elon Musk says playing video games is how he and 'many of the best software engineers' got into programming

Tesla CEO Elon Musk reacts during a conversation at the E3 gaming convention in Los Angeles, June 13, 2019.
Mike Blake | Reuters

Before Elon Musk became obsessed by space travel and electric cars, he was a kid who played a lot of video games.

Speaking at the Electronic Entertainment Expo (E3) video game convention in Los Angeles earlier this month, Musk addressed the impact video games have had on his vision and the careers of engineers everywhere.

"Part of the reason, maybe the reason, I got interested in tech was video games," Musk said. "I probably wouldn't have started programming if it wasn't for video games or wouldn't have been as interested in computers and tech if it wasn't for video games. I think video games are a very powerful force for getting young kids interested in technology; it has way bigger knock-on effects than people may realize."

Elon Musk, multimillionaire, rocket scientist, Tesla and Space X founder, at his desk March 19, 2004, in Los Angeles.
Paul Harris | Getty Images

Musk speaks from experience. At just 12 years old, he coded and published a space fighting game called "Blastar" which later sold for $500 to trade publication PC and Office Technology magazine. He once worked at a gaming startup ("Which weirdly was called Rocket Science — fate loves irony," Musk has joked). And though his more recent birthdays may have been spent pulling all-nighters at Tesla, Musk once celebrated his birthday by asking for a life-size statue of Vault Boy – the fictional mascot character from video game Fallout.

But Musk isn't the only one who has found inspiration – and success – through gaming. The link between the two is obvious when he interviews his future employees.

Participants sit at computer monitors to play video games at the 2018 DreamHack video gaming festival on January 27, 2018 in Leipzig, Germany.
Jens Schlueter | Getty Images

"If we're interviewing somebody for a software engineering role at Tesla or SpaceX, many times we'll [ask], 'How'd you start programming?'" Musk says.

"I think many of the best software engineers in the world are at, or spent much of their career at, video game houses," Musk says, emphasizing how problem-solving in video games transfers over to problem-solving in software engineering. "If people had to try to create incredibly realistic graphics using very little computer power, it's a hard problem, so a lot of people had to write really tight code and come up with really clever ideas to do that."

For Musk's team at Tesla, the enhanced graphics in video games enable them to better simulate self-driving cars with the help of artificial intelligence. He tasks his simulation team with creating a photorealistic world of what he says are some of the most boring things: skid marks on the road, concrete curves, shadows, and faded street lines. These simulations have been essential to the development of autopilot cars, which are scheduled for a full rollout next year.

He also credited video game Cyberpunk (as well as the movie "Blade Runner") as the inspiration for the Tesla pickup truck.

A sketch of a Tesla pickup truck concept, revealed at the firm's Semi truck and Roadster event in Hawthorne, California on November 16, 2017.

"It definitely doesn't look like a normal car, it looks like it should not be on the roads, like it came out of a movie or something," Musk says. "It won't appeal to everyone, but it'll be something that's different. I think I would buy it."

Musk wasn't just at E3 to talk about his new pickup truck. He announced the addition of video games to Tesla vehicles — drivers can play games on the car's center screen while docked at a charging station. He even hinted at developing games for his space capsules going to Mars.

"My experience is, if you're trying to figure out what others love, but you don't love it, it's really hard to make that great," he says. "So when you work on something, if you fall in love with it, that's a good sign – and then don't worry about if others do. If you do, others will."

Like this story? Subscribe to CNBC Make It on YouTube!

Don't miss: Elon Musk lived on $1 a day when he moved to Canada as a teen and other surprising facts about his youth

Elon Musk, Albert Einstein and Steve Jobs all have these traits in common
Elon Musk, Albert Einstein and Steve Jobs all have these traits in common

Correction: The character of Iron Man was created decades before Elon Musk became a scientist or entrepreneur. An earlier version of a Getty photo caption misstated Musk's influence on the Marvel character's creation.