I find the second method easier to work with, although some are able to just flick an internal switch and stop one fine day. At the same time it's good to start working on your side projects by starting small (extremely small, whatever you're willing to agree with), and then increasing it over a period of time. I've found this method to help. You could start with something as small as just 5 mins of work per day, or a really small task for that day. Once you feel like you're making progress (no matter how small), you'll automatically find the incentive to focus on it more, and spend more time on it.
Addressing why you turn to games will help lay the foundation to feel like you have more choice in how you spend your free time.
It's difficult, but figure out the 'why' you should stop playing games and that will give you a reason to stop so you focus on your why instead. I.E I want to stop playing games so I can spend that time with my kids and be more part of their life's etc.
Break your side project down into much smaller tasks so you can get those quick dopamine hits like you do with gaming. Keep breaking the larger efforts into much smaller tasks. If something has a barrier to it, create a task which eliminates the barrier. Always be thinking "what is the next step to make progress?" The tasks should be trivial to get progress going. It should feel good to make progress, build upon that with more small tasks.
I find that doing nothing helps me to reset myself and allow me to chose what activity I'm going to put my attention to.
Once you're free of your urges, chose your side project, and just do it. Get moving.
While you're working, you have to resist the urge to play games or do some other activity like watching TV or mindlessly browsing the web. You might give yourself the excuse that you're only doing it to resist the temptation to play games, but you're just replacing one addiction with another.
Also, focus is an ability you need to exercise, so the better you resist those urges, the better you'll be able to focus with time.
If you get stuck in your project, I refer you to:
https://news.ycombinator.com/item?id=19955830
Just continue by working on smaller problems at a time. When you slow down, look to accelerate. You can't go from 0 to 60 mph suddenly, but you can accelerate. It's better to move slowly than to not move at all.
If you suddenly find yourself back to playing games or otherwise wasting your own time, repeat from the start, and do nothing once more.
If the above doesn't work (probably if your gaming addiction doesn't come from procrastinating on your project), realize that gaming is a form of escapism. We use escapism to avoid facing something (or multiple things) in our lives. Something that, for lack of a better word, scares us. Everything that scares is so because we lack knowledge of it, especially how to deal with it. You need to figure out what that is and face it as best you can. By facing it, you learn about it, and by learning about it, it ceases to be scary. You don't need to deal with it perfectly, but often not dealing with it is worse than doing a poor job of doing so. Once you've done your best at dealing with it, realize that "your best" means you couldn't have done better. By definition, you gave it your all, so there's nothing to regret in how you dealt with it. By your ability when you dealt with the problem, it was impossible to do better. You can now move on from that problem and, hopefully, your need for escapism.
Now, between you and me. Are you side projects VERY GOOD? Is it your main passion and mission in life? Are they ideas which if enough time, got a lot of potential or are they just something you work with the hopes of it making it big?
If they aren't, you will play games or do something else. And that's fine. Most ideas and projects suck. Instead of worrying about this, play the game... and look around, when you find something truly exciting, you will do it.
Also, let you play as much games as you want, given that you do your duties, and set aside like 30-1h for self-development as part of your duty. Do programming exercises, read programming books, or things that are important on your field of expertise. Also go to meetups with other cofounders and keep looking around.
That way you are good for the job market, you chill playing your games and you keep looking for a great opportunity.
I'm also without any very good ideas atm, I browse around, checking for ideas and exploring markets. That's normal.
Don't listen to PG or people that say that you should just build something. This is only good for an Angel investor or incubator due to 0.0001% of the people that do it and find a good market BY LUCK, they go big and incubators and angel investors take their cut.
You only live once, 1 life. Enjoy it! And if you end up seeing a problem that you can fix or find something worth dedicating your life to, then I believe your brain and your body will want to do it instead of playing games(or anything that gives you pleasure/fun/challenges). Also, send me a message if you find that, because I'm doing practically the same as you.
:(