Actor Tobey Maguire has always been a tough nut to crack. After several years playing second-fiddle to his close friend Leonardo DiCaprio, Maguire became a legitimate star through the blockbuster Spider-Man films. But in recent years, the actor has been taking on roles rather infrequently. His last starring role came in 2014’s Pawn Sacrifice.

But the actor has certainly had an interesting journey. On his 47th birthday, here’s how he emerged from a poor childhood, to quietly cultivating a very successful career as a poker player.

“As a kid, I was very poor,” he told The Guardian in 2013. “I mean, it’s all relative, but we would get groceries from neighbours. I always had a roof over my head, but I slept on couches of relatives, and some night we wandered into a shelter. My family had food stamps and government medical insurance. And I wanted to get out of that, so my ambition was initially to make money; I was pretty driven.”

Maguire said that despite being strapped for cash, he was always a driven person; making money was important to him. “It’s about having your brain space occupied by worrying about what I’m going to eat or how I’m going to pay rent, which is something I have contended with in life,” he said. “Once you’re not having to worry about that on a day-to-day basis, it allows you space to think about other things.”

After tasting success in his teens, the actor developed a drinking habit, which he kicked when he was 19. He later credited Alcoholics Anonymous for getting him through sobriety. “I stopped consuming any mind-altering substances when I was 19 years old. And I’ve been abstinent since then,” Maguire told Guardian.

According to the Belfast Telegraph, he said, “In my late teens and early twenties I started to do movies and got well known but I don’t think I indulged to any level that is abnormal. But I did as a teenager have some difficulty in that way and had to make some life decisions and change some of my behaviour. I got sober at 19 and have been sober since so there was no excess in that regard from 19 on.”

Part of the reason why he hasn’t been taking on too many film roles in recent years is because he has cultivated a career as a poker player. According to writer Houston Curtis, Maguire and him would run high-stakes poker games for the likes of Ben Affleck, DiCaprio and Matt Damon going as far back as 2005. Curtis estimated that Maguire “could have made up to $30 to $40 million from the games,” in just a matter of four years.

In fact, Maguire’s underground success at poker was so legendary that the Player X character in the film Molly’s Game, was said to have been inspired by Maguire. Molly Bloom, the subject of the film, was behind organising some of the highest-stakes poker games in Hollywood before the FBI shut her down.

She told ET that Maguire, who was a part of several games that she organised, would not have been pleased with the film. Asked if the “story where Tobey Maguire asks (her) to bark like a seal for a thousand dollars” is accurately portrayed in her memoir, she said, “That’s an accurate portrayal. And that was an important story for me to tell before we were actively having these conversations. Not because it was him, but because I didn’t do it. I lost the game. I think it’s important to remember you don’t have to do everything that everyone tells you to do. You don’t have to come at it out of fear. If it’s your dignity on the line, choose your dignity.”