Hi all,
I will probably use javascript to develop an online board/card game. My approach will be to have a client that will be able to work in standalone mode, so it must enforce rules. That means for example, if a player can't play a card, he or she shouldn't even be able to play it. This is to enhance the user experience.
The idea here is to add hooks to send and receive events to and from the server, and share the code that implements the game rules between the server and the client. I don't see the point of writing them twice.
So, if I play in "server" mode, the client will update the server with my actions (verifying them as well), and the server will send me updates about the rest of the players.
Is there any framework to leverage this work?
For the server side, my options seem to be Node.js (unstable, but everything would be JS and that's neat), Erlang + erlang_js, and maybe some of those weird frameworks that "compile into javascript", that I'm no really fond of.
Thanks in advance.