I’ve often found that trying that sticking with a problem from start to finish is usually the least efficient way of getting it completed. Quite often if I take a 1 hour break whilst I’m in the thick of trying to solve something I’ll usually figure the answer out before I return, being able to move onto the next bit of work in far less time than if I had tried to struggle my way through. I think this is the main reason why the lawn gets mowed routinely during he summer months, that 30 mins~1 hour of basically mindless work let’s my subconscious tackle the problem in ways that I can’t do normally.
The most recent example I can think of was the problem of producing realistic gravity in the game I’m developing with a good friend of mine. I’ve had the basic gravity mechanics working for ages and even managed to get a planet into a near-circular orbit around a star. Unfortunately from there finding other stable orbits for varying distances and masses proved to be quite troublesome as there didn’t seem to be any kind of simple relationship that I could derive that would produce the same circular orbits as I had achieved after tinkering around with initial forces for a couple hours.
It’s been a real pearler of a problem too as whilst I’ve been able to make steady progress despite this (my one little test planet is enough to get most things working) I still couldn’t figure out how to give a planet a stable orbit based on its mass and initial distance from the sun. I tried many different things, from trying to map an equation based on a couple stable orbits to pushing the planet around so it would stay on course (which hilariously flung planets out of sight). Then late one night just before I was about to fall asleep it hit me: I could use the force that was being applied to the planet by the sun as the magnitude for the initial force. I then just have to work out the components along the desired orbital trajectory (breaking out some good old fashion trigonometry) and I should be on my way. I haven’t tested this yet, but it’s the only idea I’ve had that hasn’t involved fussing around with variables for hours on end.
It’s that same process that jolts you awake in the middle of the night with that name that you couldn’t remember or that fact you were trying to come up with at a crucial time. I find it really intriguing as I obviously have the ability to solve these kinds of problems somewhere in my head however I just can’t have it on tap, I’ve just got to let my brain do its thing whilst I wait around for the solution.