I wonder If you could do a virtual world using only HTML5,CSS3,PHP,Javascript and mysql. I saw other sites using smartfoxserver which I am trying to avoid. I thought about when user visit the link to a virtual world, The row under a column such as presence is changed from no to yes. Then the server will get all the names of people that have yes under their useame. It will then load an image of the avatar which would be previously stored and put it in html. Also, a user inside that world should be able to move with arrows left, right, up, down. I would have javascript record those if their is focus inside the area containing that world which would send a query to php in order to change the row from idle to the arrow pressed which would then be given to all other users coected in that world since I would put an ongoing while loop there checking if any user has moved. The php would send back which key he pressed and then send it to ajax which would then make a css3 transform in order to move the avatar in the users browser.
I am wondering if this solution would be fast or not along with your thoughs. I am worried about the while loop which I think would cause the php file to crash and would like to know what I should do instead.
