Gibson EB Bass

As a bass player, there are several ways you can approach a song. One way is to write a dedicated bass part which does its own thing. There are plenty of great examples of this: Paul McCartney's wandering lines in The Beatles; many of Geddy Lee's great Rush basslines; even Michael Anthony's steady eighth or sixteenth-note pedalling in Van Halen would qualify. Another option is to follow the guitar part, doubling it an octave below. This is pretty common in metal and it's one of the reasons you don't hear Jason Newsted on Metallica's …And Justice For All: he's doubling the guitar so perfectly that it almost sounds like his bass is actually an octave pedal faded into the background (the mix was also pretty unforgiving to poor Jason, but that's another story). And then there are players who combine the two approaches: listen close to Red Hot Chilli Peppers and often you'll hear Flea borrow a few notes from the guitar part, diverge into his own thing, then come back to the guitar riff again.
Ah, but there's another way, a way that, to my ears at least, stands out as the most impactful way of constructing a bassline. It's not something you're going to want to do for every section of every song, but it's definitely a cool way of adding some depth to an arrangement, especially for a verse or solo section. And it's simple: just double the kick drum.
For me, the master of this style is Queensryche's Eddie Jackson. He locks in so perfectly with drummer Scott Rockenfield's kick that at times they almost seem to be one and the same. The bass adds harmonic content to the kick, while the kick adds impact and punch to the bass. It's a win/win.
Often the best way to do this is to simply pick the root note of the song and then lock in with the kick. When writing a song I often program the drums first, then when I'm constructing the bassline I'll simply follow along with the kick drum in the MIDI edit window to figure out exactly where the bass notes should go. This helps me to follow the kick even during complex fills which might require the kick falling on unusual, unorthodox beats. And, if you're the kind of drum-programmer who likes to throw in plenty of velocity variation for a more realistic 'almost-like-live-drums' feel, you can export a .wav file of the kick drum and follow that on the screen, adjusting your right hand attack accordingly.
If you're using this method of arrangement, you need to consider what tone you'll use. If you use a very clean, punchy tone you'll certainly reinforce the power of the kick drum, but you'll blend into the background. If your sound is too overdriven and low-end-heavy, you'll obscure the oomph of the kick drum. I find that the best compromise is to use a tone that's a bit overdrive but with some of the low end zapped out and a heavy amount of compression. This will give you a bold, harmonically-loaded tone which isn't eaten up by the fullness of the kick drum's low end, and in turn is not stomping all over the kick drum's right to exist either.
Here's a little bass/drum unison riff which demonstrates this concept. I've purposely written the rests as a bunch of 16th notes instead of filling them out as separate rests because it sometimes helps to conceptualize this stuff as a grid of 16th notes with either a note or a rest on each one, rather than thinking "well I have two 16th-notes and then a quarter rest…"
Syncing Bass and Drums notation

Feel free to experiment, of course. There's no reason you can't fill in the non-kick parts of the bar with a cool little melody, some harmonics, a chord, some popping or maybe even some Whammy pedal squeals. But as long as you keep coming back to that kick drum, the effect will work.