the short answer is.. it depends what you want to achieve...
traditionally the bass is there to outline the basic rhythmic & harmonic environment, so (forgetting about rhythm) the first way to do it is to imply the tonal centre, harmonic environment and chord movement... i.e. if the guitarist was going:
A / / / | A / / / | D / / / | E / / /
round and round, you'd probably want to start off with a nice big fat 'A' note or two (establishing the tonal center), and it'd be nice to throw in a C# (the major 3rd of a chord of A) and an E or two in bars 1 & 2, to show that for the 1st two chords at least, you're in a major harmonic environment, and for the chords on bars 3 & 4, you want again to hit roots and chord tones where possible, establishing the chord movement
but if your guitarist is strumming big healthy chords, you might not need to show everyone you're in A major because he's taken care of that... so you can concentrate on creating a line that connects the chords in a way that has a bit more character... there are zillions of possibilities:
1. use a 'modal scalar' approach... for a chord progression like the one above, you can connect the chords using modes built on each chord root... i.e. A - Ionian, D - lydian, E - mixolydian... they all have the same notes so it's easy to wiggle a line through the chords...
2. chord inversions... try starting one or more chords on a different chord tone than the root... the most obvious candidate in the above chord progression would be to start bar 2 with a C#.. as it would outline movement to the D in bar 3 and also unsettle the harmonic environment (subjective, but then.. music is

)
3. chromatic movement... move to the D using A-B-C-C#, or A-E-Eb-D.. not only this, but you can create lots of tension & release by landing on chords from a semitone above... it won't always work but it can be powerful if you do it in the right place
4. minor tones... there's often no reason (especially in rock music) why you shouldn't stick in minor tones over a major chord... i.e. in A major, try using the minor 3rd, C and the minor 7th, G... they often sound great & more badass than their major bro's
5. octaves... if your guitarist has the harmony covered... make your roots interesting by using octaves
6. register displacement... you can create character & tension often simply by playing the same thing you just played only an octave above... or an octave below
7. notice that the higher up the neck you go, the more unusual the notes (harmonically tense/dissonant) you can get to work... I think it's because the ear can work out more easily what's going on with higher frequencies, so an 'outside' note played high up the neck can be processed by the brain easier than an 'outside' note played way down... your listeners will also be accustomed (consciously and unconsciously) to processing bass frequency notes as information on the 'fundamental harmonic environment' and the higher ones as the melodic content... so if you start switching the roles about.. it can be thrilling but it can also be confusing.. so what i'm saying is... the register you play in has a direct effect on the effectiveness of your note choices
erm... sorry for rambling on so much
