I wrote a multiplayer boardgame using P5 and sockets, would love some feedback from this community!

Pente is one of my favorite boardgames, so I wanted to remake it so I could play it with anyone during Quarantine! I would love if you all could take a look and give me any kind of feedback: look, playability, code, etc. Hope you enjoy it!

1 Like

Just a thought.
In these times of fast clicking on an overwhelming amount of options, people go-ahead by their first impression. So, a lovely picture or drawing at startup would help. Also, people do like buttons to continue instead of refreshing the page. I would also separate the (well written) “about” page with a small instruction sentence at the start page.

1 Like

Can I play on my own (against myself) just to test it and to see the board?

Thanks for the feedback! Yeah, the reset button is the next feature I’ve been working on, but I’ll have to think about how I can give a better preview to players!

Yup! Just open the website in two tabs and give yourself your own code.

2 Likes

This is very, cool. I’m just starting to dabble into P5 from processing, could you point me in the direction of what library/ reference section of the P5 site you used to figure out how to do the multi client connection? Meaning the part where one player uses a code to connect to another player. I’m really curious how this works if you wouldn’t mind sharing! :grin:

Of course! I ended up using socket.io and their “rooms” concept in conjunction with an express node server. Basically, as I see users come in, I use socket.io to create new rooms and tie them to a code. If someone comes in and enters that code, I check (with some validations like number of players) if that code exists and is tied to a room, and then let in or block the new player as appropriate. Finally, after certain timeframes or actions are taken, I “clean up” or delete old codes and rooms. Socket.io has great documentation on how to use their rooms and it’s really easy to grasp!