Php Server/Client for Online Game
Posted: Wed Aug 12, 2009 10:45 am
I have created many different servers and clients in other languages and am now trying to figure it out in php. I understand how to use mysql functions to store and get data, though I am worried about the best way to handle the data in real time.
For example, lets say that I have a simple online game where a player logs on and moves around the map. The player can see other players and chat in a text box. I can let the php on the player's side handle everything, though now what if I add in NPCs? By letting the php on the player's side handle NPCs, they get out of sync and could do things they shouldn't.
What should I use as a server to control NPCs and everything else real time?
I was thinking that I could make a php server that's always pulled up on a machine to control everything in the database, but I'm worried about speed and such.
Any ideas?
-Gandolf
For example, lets say that I have a simple online game where a player logs on and moves around the map. The player can see other players and chat in a text box. I can let the php on the player's side handle everything, though now what if I add in NPCs? By letting the php on the player's side handle NPCs, they get out of sync and could do things they shouldn't.
What should I use as a server to control NPCs and everything else real time?
I was thinking that I could make a php server that's always pulled up on a machine to control everything in the database, but I'm worried about speed and such.
Any ideas?
-Gandolf