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