So I started getting into some Bossa some time ago and I dont have the slightest clue about playing with a drummer a basic Bossa line. Ive tried playing with 3 drummers and every time I tried improvising something it didnt work out.

So how does the formula for playing Bossa work? What notes should be with an accent and is it any similar to jazz playing?

Bossa nova sounds so deceptively simple, but is a bear to get in the pocket and sound good as a bassist.

In traditional bossa the bass player plays a 1_3_ &1 rhythm. Think "Girl from Impanema". The drummer follows that rhythm on the bass drum and will either play a clave pattern or a kinda of swinging 8th pattern on cymbal..

What every you play it should have that funky kind of sway--the beat you move your feet to when dancing Bossa. Move your feet with Bossa and when your foot hits the ground you should play a bass note. Seriously. You can add fills here and there, but as the bass player you better be religious to the bossa beat.
A good formula for me has always been this:

Alternating between the root note and 5th of the chord tones in this pattern. Dotted quarter to eight, dotted quarter to eighth. Changing between 1st and 5th after every eighth note. And of course adding fills in where appropriate, I like to include 9s often in my fills on these.

Of course that is just a very basic outline that will work on most bossa nova tunes. It is by no means the only way to play them.