I want to make a game using java ( really, i want to do it in xna, but first i want to do a prototype still learning xna ), and i got the idea to connect it with php for multiplayer capabilities.
what i want to do is make the server side on php (and use a hosting, or my university server)
there is no need to have something really “fast” ( i have all the game planned, turn based, and part of coding done )
my idea was,
php is running the game flow, the server will be connected to both players, and both players will be connected too.
when players1 make a movement, sends it to the servers, and sends a signal to player2, then, player2 ask the server what have player1 done ( all this is for security issues )
my question is, i was thinking in make java connect php as if it was a web page as any other, but i think that wait for the http response could be really slow, somebody have some tip, another way i can do this?
i would suggest something using the COMET model, this way you wont have latency issues as the connection is already made and is waiting for info to come in.
this will be essentialy a long polling solution.