Q: how to write good bass lines?
A: you're gonna wanna write the song, instead of the bass line. however, in maybe 1 out of 50 songs, the bass line IS the song, and in that case you'll wanna go ahead and write the bass line. but that doesn't answer the question of how to write anything, and the answer to that is it has to write you, although i realize that seems counter-intuitive