A friend and I (mostly him, I just helped out a little) recently used netplayjs to create a p2p version of slime volleyball. It was surprisingly fun, not that hard, and this article is a pretty fair description of what to keep an eye out for. If you're looking to make an online p2p game, highly recommend this library, it's quite easy to work with.
netplayjs: https://github.com/rameshvarun/netplayjs