Yes, it's possible. In fact, I just made a game over the weekend.
How do you do it? You have to be very careful about what you work on and how you do it.
1. Scope is your ENEMY! If you have a weekend to put out a game, your game needs to be super simple. Almost a tech demo / prototype.
2. You're going to have to spend money. I spent $110 to make my weekend game by purchasing assets from a market. It took the creators weeks to make these assets, so if you want to create them yourself... you're not going to finish in a weekend.
3. Build the CORE game play first, then add on to it. Don't invent the core game play in your head and add on to it in your head. Add, test, iterate.
4. You should use Unity or Unreal Engine. It's going to take you several months to get proficient enough to bust out a game in a weekend. DO NOT build your own game engine.
I'm going to spend a day or two more to polish my game, then release it into the wild and see how people like it.