Sup3rkirby
New Member
- Messages
- 181
- Reaction score
- 0
- Points
- 0
First, please make sure you know about AJAX and probably a bit about PHP before you attempt to help me.
Ok. So while I don't exactly have the time right now, I will have some time later to work on some new ideas and scripts. Of course one of these is a mode of game play(for a game I'm developing) and I would like to integrate a system that lets you play with other users asynchronously(hints: AJAX). Of course I am no guru or even that good with flash and most games I've seen that let you actively interact with users in more than one place have been done in flash.
So for anyone who really knows about AJAX and PHP, would something like this work well in AJAX? I am just curious about the game being able to run smoothly. There wouldn't be heavy graphics and fast action. I am just not sure how fast AJAX can send and recieve to a PHP script on a server to work as a game server.
If you need a bit more of an explaination, lets say the game simply has little avatar like characters that are moved with mouse clicks(well, hold down the left mouse to move and the avatar follows the mouse). You have a small map(640x480) and you want to run maybe 5 players on that screen. Now how well would AJAX be able to send and recieve data with these 5 clients if it was sending to a PHP file that saved variables(character positions, character stats, etc.) and then sent back out all the information to each client? I wouldn't mind something like a slight delay for other users in the game with you. Such as the other 4 players on your screen might lag 1-2 seconds, but this game does use action so it doesn't matter if they lag a bit.
Just curious about this all. I've done an AJAX chat(W.I.P.) and have managed to be able to send and receive data with quite a few clients. My chat system could probably hold 50 or more and there is only a delay because the chat refresh timer is set to 2 or 3 seconds. So I would assume AJAX could handle well. But for a game I would like to set a timeout for about 100-500 ms.
Ok. So while I don't exactly have the time right now, I will have some time later to work on some new ideas and scripts. Of course one of these is a mode of game play(for a game I'm developing) and I would like to integrate a system that lets you play with other users asynchronously(hints: AJAX). Of course I am no guru or even that good with flash and most games I've seen that let you actively interact with users in more than one place have been done in flash.
So for anyone who really knows about AJAX and PHP, would something like this work well in AJAX? I am just curious about the game being able to run smoothly. There wouldn't be heavy graphics and fast action. I am just not sure how fast AJAX can send and recieve to a PHP script on a server to work as a game server.
If you need a bit more of an explaination, lets say the game simply has little avatar like characters that are moved with mouse clicks(well, hold down the left mouse to move and the avatar follows the mouse). You have a small map(640x480) and you want to run maybe 5 players on that screen. Now how well would AJAX be able to send and recieve data with these 5 clients if it was sending to a PHP file that saved variables(character positions, character stats, etc.) and then sent back out all the information to each client? I wouldn't mind something like a slight delay for other users in the game with you. Such as the other 4 players on your screen might lag 1-2 seconds, but this game does use action so it doesn't matter if they lag a bit.
Just curious about this all. I've done an AJAX chat(W.I.P.) and have managed to be able to send and receive data with quite a few clients. My chat system could probably hold 50 or more and there is only a delay because the chat refresh timer is set to 2 or 3 seconds. So I would assume AJAX could handle well. But for a game I would like to set a timeout for about 100-500 ms.