2
\$\begingroup\$

I want to learn more abot how to use some kind of presentation/input layer that communicates with server for HTML5 games.

Instead of sending all the code to the clients browser, I would like to just send a simple interface and code to handle the keyboard input. The algoritms for the game would be kept on the server and the data for the game would be sent with AJAX. I guess this is possible, but I cant find any tutorial that show some simple examples how this should be done.

Is there someone here how knows about tutorials about this or have knowledge about this and would like to share some info about this? I'm just looking for an overview of the design so that I know what to focus and seek for.

Could the algoritm be done in PHP functions that return back the data to the game? I guess there could be some bottlenecks in time delays, but I'm not going to create any fast action game.

I read some about Websockets and Node.js. But to use Node.js, I guess you have to pay to get a special server that run Node.js.

Looking forward to get some info or tips! :)

\$\endgroup\$
2
  • \$\begingroup\$ This is done in Node.js (which you could try out on your own computer) but might help you with the general design. \$\endgroup\$
    – Mike Cluck
    Apr 15, 2014 at 18:45
  • 1
    \$\begingroup\$ I voted to close; your question is essentially polling for tech suggestions, tutorial lists, and get-started advice. All of those are considered off-topic, see [help:dont-ask]. You may consider posing this discussiony question in Game Development Chat. The generic answer to your question is Yes, it's possible. In brief, node.js is free, php's speed will be less of a bottleneck than network latency, and ajax is servertech-agnostic (so just pick one and use it). \$\endgroup\$ Apr 24, 2014 at 14:53

0

Browse other questions tagged .