Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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! :)

share|improve this question

closed as off-topic by Seth Battin, Jari Komppa, Anko, MrCranky, Noctrine Apr 28 '14 at 23:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Seth Battin, Jari Komppa, Anko, MrCranky, Noctrine
If this question can be reworded to fit the rules in the help center, please edit the question.

    
This is done in Node.js (which you could try out on your own computer) but might help you with the general design. –  Mike C Apr 15 '14 at 18:45
1  
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). –  Seth Battin Apr 24 '14 at 14:53

Browse other questions tagged or ask your own question.