Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

how to do user input php script

Links for php scripts

Moderators: macek, egami, gesf

how to do user input php script

Postby nairarun88 » Thu Sep 13, 2012 9:00 pm

Hello,

problem in php does not wait on user input becaues it is a server side language and therefore problem is client-side one...

i am going to make a game, it's multiplayer game... multiple user... At the start of every game round the users involved in the game are prompted with a chose of things they want to do that round. Course, the round isn't to commence until everyone has made a selection on what they want to do that round.

so that is the problem how can i make a script for all users for sending a request... before contnuing execution... i am working in php server side.. the answer wouldn't be with the client as the client is only responsible for one user and wouldn't know what the outher users are doing.

kindly guide me & suggest me from where i have to start?

Thanks.

web design company
nairarun88
New php-forum User
New php-forum User
 
Posts: 1
Joined: Thu Sep 13, 2012 8:40 pm

Re: how to do user input php script

Postby dering » Tue Sep 18, 2012 6:13 am

I am new to PHP as well and your problem seems interesting to me. You need the players to be able to communicate with each other. I would break it down into something like this:

//Allow user to input desired settings
//Communicate settings to local files as a means of transferring data
//Wait/Loop until required peer players are ready to begin
//Start the game

I would attempt to solve the problem of communication with the fget() and fput() commands. Each client would place their own information into their own local file. Each client would scan for information file from peer players.

This is of course a basic new programmer approach. I suspect it would not be particularly scalable to massive application to many players. It would be interesting to see how the pros would handle this.
dering
New php-forum User
New php-forum User
 
Posts: 5
Joined: Tue Sep 18, 2012 5:59 am


Return to PHP Scripts

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron