I am crazily happy today basically because i jst experiment and found a method with Old Comet System that can now actually make realtime games possible just with PHP and JavaScript (for those who know PHP and JAVASCRIPT BOTH ::
Just make a dynamic stack of xmlHTTPRequests (XHR here on) to server for getting a variable information i mean at a time manage more then 1 XHR's and code the server side script to give reply to only request at a time (i leave it to you how to do that ) , using the architecture and using a function like
function XHR()
{ make multibrowser XMLHTTPRequest;
}
var RequestRate;
function SetReqRate(){
var Last = new Date().getTime();
tester = new XHR();
params = "Hi=Hello";
tester.open('POST','yourUrl.php','false');
tester.send();
var Now = new Date().getTime();
delta = Now - Last;
RequestRate = math.ceil(1000/delta);
}Now POP() all the requests that have responded and PUSH() n requests per second you could also handle your function dynamically to have epic fast rate of data transfers
I know streaming is a solution but streaming can bug sometimes in my model it can never bug i mean if streaming crashes the whole application is crashed but if 1 request crashes in this model it wont just update the variables once -> the nxt request will cover it up
..
and also my chat project nearly being finished!!! (Though much done is left)
Last edited by fanofcena (2011-05-14 11:30:28)
Offline