63 posts
Location
The Netherlands
Posted 23 May 2013 - 12:16 PM
So, if we would be able to collect some good programmers we might be able to use PhP and Javascript to make our own server, hosted on a website. As far as i know Minecraft works with sockets ect. and im thinking: Cant we receive and send these connections, making a mod and a site?
I'm just started on Java so i dont know a lot about these connections.
- Rickydaan
63 posts
Location
The Netherlands
Posted 23 May 2013 - 12:23 PM
I will look into this by tomorrow. I might be able to figure out how this all works. I hope this works and that we can use web-hostings as our server hosts! Maybe we are able to write plugins in PhP / Javascript!
686 posts
Posted 23 May 2013 - 12:38 PM
I am pretty sure this can't be done, for many reasons. The biggest thing being that PHP is a responsive language. PHP only does something when you tell it to by loading a page. You can get around this by spamming chron jobs, perhaps, but that has its own issues. PHP doesn't store information in RAM outside of that specific instance of the script, so everything would have to be DB-based.
So maybe it's not 100% impossible, if you had a lot of time on your hands and the full, unfuscated source code, you might be able to emulate something resembling a minecraft server. You might be able to connect to it. You MIGHT even be able to watch the world start to load. And then you'd disconnect, because it was terribly slow. Would you have acheived something? Absolutely. Something useful? No, not likely.
1214 posts
Location
The Sammich Kingdom
Posted 23 May 2013 - 01:14 PM
No. D3matt pretty much explained it. But a few other people and I are working on a MC server in Node.js. We have quite a bit done. But PHP isn't the language you would use for game servers at all.
1 posts
Posted 23 May 2013 - 04:17 PM
While you probably shouldn't use PHP to make game servers, it is completely possible.
I made the mistake of writing a game server in PHP a while back. The main issue is that there is no threading, and at the time there was also no asynchronous MySQL library for PHP, so queries had to be kept to an absolute minimum.
Other than that, it did actually work quite well, able to hold at least 300 players per instance without lagging. I have no idea if it could handle more, as the game it was for, Club Penguin, became quite silly to play with more players than that per server.
Given the chance to go back and do that again, I definitely wouldn't code it in PHP!