Answer the question
In order to leave comments, you need to log in
What power is needed for a browser game?
I'm developing a browser game where 1 or 5 (in a group) play against an "AI" (quoted because it's an AI type). Players can use all sorts of abilities, with a gap of 1 second between them. That is, all this happens through ajax.
I have a response time of 0.04-0.06 seconds on denwer, and I'm testing one. I want to put it in closed access for group testing. That is, 5 people, each of which clicks every second. And if you look in the future, then several groups can still play at the same time. And for each request, the server must perform calculations and update the values in the database.
What do you think? Where should I post this or should I review the gameplay of the game?
Answer the question
In order to leave comments, you need to log in
Now you have such a response time on the local machine - it may well be. given that most likely most of the logic you have not implemented (by the way, Denver is very slow).
When you put it on the server, add network delays (at best, around 50ms per request, since you are unlikely to find an acceptable level of delay on regular hosting). If you have a good enough machine, where there will be no limit, let's say 10 threads, but there will be a normal number of them, then everything should be fine. Your 5 people, and even 25, will withstand regular hosting without problems, but this needs to be tested, and not told like I'm guessing on the coffee grounds.
In general, if you have a real-time element where you need to press a button in time, WebSocket is best suited in your case, in my opinion.
Revise, rewrite to websockets.
Ajax by timer is the worst option you can think of. Due to load, responsiveness, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question