I have a story about that. Also, general /what motivates you to do what you do?/ post. Was going to reply to a what motivates you post, but thread was archived before I could so here it is.
I spent four years learning and working on a project with a friend. When it was time to pay he ignored it and then stole the code and ran off with nothing to say. It was a very hard time for me. He also sent my personal information to everyone, which I don't care about because I'm an adult so it's not like anything is going to happen, but it's just the principle of it. It's just a dirty thing to do on top of everything else.
I didn't have backups and I lost all of the work I had done when my hard drive failed. I could have recovered it, but I didn't care.
Recently, I started back up with a new solo project to do what the original set out to do.
If I can lose everything I worked for for four years and then come back to do it again, clearly I care about the project so much that nothing can stop it. Motivation is fleeting, but for me I've been motivated for four years and even after that, the same amount, if not more, when I started.
I'm motivated by pure hatred, people saying I can't do it, by the fact that it's so difficult to do that no one has done it and when you look up how to start game developing everyone instantly crushes your motivations by telling you to make a simple 2D game.
I don't care about people stealing my idea because I literally had everything stolen and I still kept going. Besides, maybe I'm arrogant, but I KNOW that I'm the only one that can do it properly and no one else can or will, even when they literally have my shit.
Get rid of toxic friends too. They are a major source of your self doubt. Don't fail because someone else wants you to. This is one of the only, if not the only, mediums where you're able to fully express yourself and do ANYTHING you imagine. Don't hinder your potential because of other people.