Mythion Posted August 17, 2014 Share Posted August 17, 2014 (edited) Hello, I am building an online game(users make a character and move on a map and so on...) All user data is stored in a mySQL database and I want the users to interact in real-time, but there can be a 1-3 second delay between the communication, but not exceed 3 seconds even if 500 players are playing at the same time. But for the purpose of the question let's say the users can only chat between one another, if I'll have a solution for that then I can use the same method for more parts of the game. I can't use websockets because my webhost doesn't support it( I don't want to use pusher.com). I know I can make real-time apps with ajax long polling, but I think that with 500 players playing at the same time it's not the best solution. So, finally: How can I make user interaction as close as possible to a real-time game? (Without too much load on the hosting server) (I am sorry if some of my terms are not correct - I am just getting back to coding after a long time...) Edited August 17, 2014 by Mythion 1 Quote Link to comment https://forums.phpfreaks.com/topic/290494-best-way-to-code-real-time-web-gamegame-is-based-on-php-mysql-jquery/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.