I always feel like my basslines should be different things at different times. Sometimes I want to stay on the roots, sometimes I want to provide a counterpoint to the melody, sometimes I want to take a lead role in the song. But I think it should always be an interesting riff, lock in pretty tightly with the drums, and really create an interesting groove to the song. Most often, my guitarist and I would come up with the song together....either he would work off a bassline I came up with or I'd work around one of his ideas. Once we had an idea pretty well worked out the drummer would work with me on creating the groove. For example, we came up with
this song in a few hours following this formula. I came up with the bassline from the beginning of the song first, then we worked around that as a theme.