Alrighty then...
I have started programming in php now (finally I should say) and I am loving it. I have put together some classes and functions for a personal project and I have started looking towards the future.
I am WANTING to put together a simple game next. Thinking about building a simple Battleship style game for practice. What I would LIKE to have is... when a user FINISHES his turn, I would like the browser of his opponent to notify him... or just refresh the screen...
I am thinking a simple class will work to handle all the pieces, the board, and the players... However... How do you get the Opponent to be notified short of them MANUALLY refreshing the screen every couple minutes?
I have considered Javascript, but I don't know it well enough to know if it is capable of database access or some kind of network communication... so, if anyone has any information that might help me in my research it would be greatly appreciated...
Thanks in advance...
PHP Communication / Chat
Moderator: General Moderators
-
randomblink
- Forum Commoner
- Posts: 51
- Joined: Wed Jan 28, 2004 11:27 am
- Location: Tulsa, Oklahoma, just this side of hell...
- Contact:
What you are wanting to do is probably not really possible with PHP ... as far as notifying someone when it is their turn ...
However, a thought I have had in the past (for a long game) ... you could have 2 users start a game ... when one makes a turn, send them an email to let them know it is their turn ...
I have written a chat type script before using javascript, the sleep command and flush and stuff .. but what you are talking about you are going to need more than PHP .. unless you want to automatically refresh the page every several seconds or minutes..
However, a thought I have had in the past (for a long game) ... you could have 2 users start a game ... when one makes a turn, send them an email to let them know it is their turn ...
I have written a chat type script before using javascript, the sleep command and flush and stuff .. but what you are talking about you are going to need more than PHP .. unless you want to automatically refresh the page every several seconds or minutes..