1
\$\begingroup\$

I've been working on an online 2 player Tic Tac Toe solution for blackberries. both old and new. And so far I have html5 code that has a 3 x 3 layout that switches between x and o for the game mechanics. I believe I'm still missing a check for win function but my question is about the server side of this game. I'm not sure how to go about learning what exactly I want. how do you take what I have now, and make this into a functioning online game?

I've been told WAMP is a good solution, as well as IIS. and its all really over my head, so i'm hoping to get a little more clarity as far as what I should focus on to bring this game to life.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

If you're building in HTML5 I suggest you look into Node.js and Socket.IO, as they fit well for your type of gameplay and are easy to implement due to Node.js' event loop. On top of that, you only need to use javascript for the client and server.

\$\endgroup\$
5
  • \$\begingroup\$ I have heard of node.js and socket.io as well. And a newer library called nowjs. what is hanging me up is how I split the code into client/server instead of just client. I'm clueless on how to code that \$\endgroup\$
    – phi1o
    Jul 5, 2012 at 10:20
  • \$\begingroup\$ Do you mean, how to share code between the client and server? If so, you can just eval(fs.readFileSync(filename) to read the raw file into Node.js and still load it normally on the client. It's not advised normally though since you should use require \$\endgroup\$
    – Nick
    Jul 5, 2012 at 11:37
  • \$\begingroup\$ I mean how do I split my code up into server side code and client side. what should be only server code, and what should be only client code? I dont know how to figure that out. \$\endgroup\$
    – phi1o
    Jul 5, 2012 at 14:52
  • \$\begingroup\$ In your case, everything happens on the server. The only thing the client needs to know is where and what to draw. I have a feeling though you're fairly new to multiplayer programming and I recommend that you do more research on the topic first. \$\endgroup\$
    – Nick
    Jul 6, 2012 at 7:06
  • \$\begingroup\$ yes. Completely new to the whole programming scene. Thank you \$\endgroup\$
    – phi1o
    Jul 6, 2012 at 13:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .