Online co-op platformer?

I’ve heard from a few other question answers that p2p is kind of limited. I want to make a game where if my friend enters the same ID code as the one the game gives me, we can both play together online. Is this possible with a platformer or am I just wasting my time?

Yes it’s possible for what I know, but you should check the wiki articles, and ask if you have any trouble.
You should consider that you’ll need a server, and a good connection, not to mention that you DO need some advanced development skills.
But yes, it’s posible.
You can start here