Re: RES: [PHP] Game development approach

From: Date: Fri, 25 Mar 2005 14:37:40 +0000
Subject: Re: RES: [PHP] Game development approach
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-211564@lists.php.net to get a copy of this message
Robert Restad wrote:
I suggest you write a 'tick' engine, which i.e. games like Planetarion use. This should be written in C or C++, compiled... You can run this using PHP of course, and run it from command line/shell, but PHP isnt ideal for this. If you have a decent server and not too much players (i.e. more than a hundred simultaneous players), then PHP will do. Any more than this, and I doubt PHP can handle without choking the server.
Hello Robert, First thanks for your answer and your help. I would like to explore this concept of using the PHP. I mean, I've already coded some small games in C++, and implementing a game loop is kinda easy, since you have the control of all the data being processed. But PHP scripts, as I currently know of, are only run when requested by the client, and the when they finish execution then they're gone. I never tried, but could it be done a game loop in PHP? I mean like a script I would start and it would keep running constantly, checking for new commands in a queue, updating objects status, can it be done or the server would kill it? Kind regards, Alex

« previous php.general (#211564) next »