Unfortunately I think all the writers I know, or whose blogs I've read, pretty much say it just comes down to discipline: you have to force yourself to write every day, whether you want to or not.
For me it's mostly getting started each day. I've had good success with making myself a rule that I have to write (code, draw, whatever) for at least 30 (45? 60?) minutes each day before I'm allowed to do anything with my computer/phone/the internet. Also things like quitting when you're ahead: always leave yourself something easy and obvious to do when you pick it up the next day.
I can't find the quote now, but someone once said something about exercise that has really stuck with me: she had been asked something along the lines of "how do you motivate yourself to keep doing it", and she replied that it wasn't about motivation: it's not about how do you make yourself want
to do it, it's about having a mindset where it's something that you are going
to do. Like getting out of bed in the morning, or eating meals, or going to the bathroom. Put it in that place in your mind where it's something that you don't have a choice about.
I realize that's kind of a tough stance, but the older I get, the more I realize that almost all the people I've ever known who consistently accomplish things work like this. You ask them how they motivate themselves, and they're almost puzzled; "It's just something I've decided to do."
Here, have some motivational quotes.
"A professional writer is an amateur who didn't quit" --Richard Bach
"We are what we repeatedly do. Excellence, then, is not an act, but a habit." -- Will Durant, The Story of Philosophy
"Everyone is trying to accomplish something big, not realizing that life
is made up of little things." --Frank A. Clark
"Video games are a waste of time for men with nothing else to do. Real brains don't do that. On occasion? Sure. As relaxation? Great. But not full time -- and a lot of people are doing that. And while they're doing that, I'll go ahead and write another novel." --Ray Bradbury, Salon.com (29 August 2001)
"Sometimes utility feels like futility, but someone's gotta do it." -- Brian Foote, via Eugene Wallingford
"Knowledge and productivity are like compound interest. Given two people of approximately the same ability and one person who works ten percent more than the other, the latter will more than twice outproduce the
former." -- Richard Hamming, You and Your Research