- Joined
- Apr 29, 2005
- Messages
- 6,400
- Reaction score
- 130
So I'm planning on creating a small mmo with the client being written in flash and the server php. I need some advice on the server though, as I'm not sure if my current ideas are as efficient as possible.
There will be 3 servers, which will basically be php scripts running in a infinite loop. More on this later.
The three servers will be:
As with every almost every mmo, I'm planning on using packets. Though, how exactly I'm going to send these packets is still a bit difficult. My idea for sending packets to the server is the following:
How I am going to send packets from the server to the client is still something I need to figure out. Suggestions are welcome.
The examples I give are simplified ofcourse, the real server will have a lot more than 2 variables.
Please give your insights on my concept. If you know what you're talking about at least.
There will be 3 servers, which will basically be php scripts running in a infinite loop. More on this later.
The three servers will be:
- Login server, receives log in requests, checks them against a mysql database.
- World server, Handles npcs and events.
- Character server, everything the player does gets sent to this server.
As with every almost every mmo, I'm planning on using packets. Though, how exactly I'm going to send these packets is still a bit difficult. My idea for sending packets to the server is the following:
- Something happens
- Client sends request to a php script, request will work with get data, ?action=move&player=whatever, a simple example.
- The script writes a line with the following format to a .txt: file: "1.move whatever end-of-string-character". Every server has it's own .txt file
- As I mentioned before, the servers will be running in an infinite loop, so every time the loop begins, it will check the txt file for a new request (Hence the number at the begin of the line) and responds accordingly. Usually this is sending a response packet.
How I am going to send packets from the server to the client is still something I need to figure out. Suggestions are welcome.
The examples I give are simplified ofcourse, the real server will have a lot more than 2 variables.
Please give your insights on my concept. If you know what you're talking about at least.