Page 1 of 1

PHP recieving live input from the user

Posted: Fri Sep 12, 2008 1:19 pm
by SteelSlasher
I am not sure if this post should be here but its more here than PHP Theory, anyway a friend and i are planning on making a web based game in PHP and i am in charge of user input and graphic generation. I have created a solution for the user input which i will display below:

Browser:
AJAX Request every second
If user sent input then send input to server

Server:
If input received take action
Send data

Browser:
If data received then display

What i really want is this:

Browser:
If user presses button send to server

Server:
If input received take action
Send data

Browser:
If data is received display

Its nearly the same but without ajax is this possible

Re: PHP recieving live input from the user

Posted: Fri Sep 12, 2008 1:23 pm
by yacahuma
Wouldn't it be better to use flash for this?

Re: PHP recieving live input from the user

Posted: Fri Sep 12, 2008 1:28 pm
by SteelSlasher
yacahuma wrote:Wouldn't it be better to use flash for this?
:( but i dont want to learn flash,

Maybe a compiled client using windows api will work and a php based server using some optimiser to keep lag down

Re: PHP recieving live input from the user

Posted: Fri Sep 12, 2008 4:12 pm
by yacahuma
I dont know flash either , but you have to choose the right tool. If you are going to have a screen with things moving, I dont think you want to go that route.

Re: PHP recieving live input from the user

Posted: Fri Sep 12, 2008 4:30 pm
by BETA
well flash is actually not that hard... the only thing i dont like about it is that it's not free :mrgreen:

Re: PHP recieving live input from the user

Posted: Fri Sep 12, 2008 5:47 pm
by Aric_Holland
Java, & Pulpcore.

http://www.interactivepulp.com

Pulpcore is an interactive 2d rendering framework, its bringing applets back. You should check it out, I have written two projects using the API and the framework and can say its great.