Mirage Source http://www.miragesource.net/forums/ |
|
Having Option to Select Mutliple Servers http://www.miragesource.net/forums/viewtopic.php?f=210&t=856 |
Page 1 of 1 |
Author: | halla [ Sat Dec 16, 2006 9:15 pm ] |
Post subject: | Having Option to Select Mutliple Servers |
Difficulty 1/5 This is pretty simple and works best with mysql since you can have multiple servers share a database but it can also be used with the other versions. You can have multiple servers if one cant support your player base but with other versions each must have their own databases. Anyways its pretty simple but might as well post it here if anyone wants to use it. Everything done here is CLIENT SIDE Go to modClientTCP. Find Code: Public InGame As Boolean Under it add Code: Public GAME_IP As String Find Code: ServerIP = Decrypt(DBKEY, "C489347322B38A4C1924B3A662A201AE98464DCA3FA926872A8A0C92212D8919") 'localip Change that to Code: ServerIP = GAME_IP Now go to frmLogin Make X Option Buttons (where X is the number of servers you want to have.) Name them something easy such as ... opt1, opt2, opt3 so on. Now make the same amount of labels. Name each whatever the servers are called and place them with the option buttons. [You can do this with buttons or listbox or whatever you like... I chose option buttons.] Now Find Code: Dim Password As String Under it add Code: If opt1.Value = True Then
GAME_IP = "127.0.0.1" Call TcpInit End If Add more for each server you have... if you have 2 servers you would also add If opt2.Value = True Then GAME_IP = "127.0.0.1" Call TcpInit End If Also remember to change the IPs to the IPs of the servers you want it to connect to. Thats pretty much it. You choose a server and when you connect it connects to that server. You may also want to have one of the option buttons set to True when you make it so that 1 will always be checked at least. Any questions or anything let me know. |
Author: | AngelicGodz [ Fri Aug 03, 2007 2:21 pm ] |
Post subject: | Re: Having Option to Select Mutliple Servers |
I want to do Muti Server So it can hold more people how can i do that without Sql script Editior? i cant seem any file to edit it |
Author: | Robin [ Fri Aug 03, 2007 4:33 pm ] |
Post subject: | Re: Having Option to Select Mutliple Servers |
You have to run three separate instances of the server. |
Author: | Lea [ Fri Aug 03, 2007 8:55 pm ] |
Post subject: | Re: Having Option to Select Mutliple Servers |
and add code to sync up. If you're going to do this, I recommend having one "master" server that controls the other servers, syncs the data, and handles trade between players, chat, etc. Then have slave servers which connect to the master, download the data files, and then become active. Players would connect to both one slave, and the master. The slave would handle their travels, fighting, etc. The master would let people chat no matter what server they were on. Also, allow the ability to switch between servers instantly. Have the slave tell the master "Hey, this guy wants to switch!" and then the master goes, "Ok, send him over!" and the slave says to the client "ok connect to here, good luck!") then the client says thank you, hangs up and calls the other server. Not too hard Edit: You could have one slave server for each region. This island is this server, this is the other. That way, you would still be able to see everyone, and the load would be split significantly. Just handle the server transition every time they change regions. You could map your game around this, so there's only one way to switch, or you could add a map property that says what region it's in and switch whenever that changes. |
Author: | AngelicGodz [ Sat Aug 04, 2007 2:09 am ] |
Post subject: | Re: Having Option to Select Mutliple Servers |
Can anyone give me the Rar and info on how to edit the Server1 server 2 to my Server name i just need the Rar to put in my Server file thank |
Author: | Robin [ Sat Aug 04, 2007 12:34 pm ] |
Post subject: | Re: Having Option to Select Mutliple Servers |
No you don't. You need to understand that to run multiple servers you're going to have to know the basics of Server - Client communication and a tiny bit of programming knowledge. Also, to share data between them you're probably going to have to use MySQL or some sort of equivalent, or use Daves idea. I would really suggest you stop asking for people to add features for you, and learn the basics of programming first. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |