And im a complete newbie wrt to Networking and stuff....
Please help me in setting up the basic stuff, so that i can integrate the multiplayer support to my game.
I have seen the document section which i found in the downloaded folder, as well as some other online sites, ...... honestly it has not helped me much (no offence to anyone) ... as i've mentioned, im a complete newbie wrt to multiplayer stuff., so please bear with my queries below. I would love to compile all this as a tutorial for the newbies like me for the XNA community , if i can gather enough info to start with, so i seek your help in this regard. Now to the queries ....
What currently we are able to do with the current help ...
1. Installed SFS Basic .... and i've started the server ....
Now, what i need to understand and be able to do is this
1. Setup a server side script in c# ... from within an XNA project ...( its fine if i have to create this part as a seperate dll project, as long as i can reference it from within XNA game )
- a. what this script should be able to do is, when ever the client sends a request (client sends a number, and a string). String points to the function() listed in the script, and the number is sent as a parameter to that function, the result that comes from the function is sent back to the client.
In the current case, i would like to see, the server be able to double the number the client sends.
- Server Side Code
OnInitialize() { ... }
OnDestroy() { ... }
On_Recieved_A_Client_Request(string request, int number )
{
if(request == "DoubleTheNumber")
{
requestedClient.SendBackResult( number * 2 );
}
}
i would also like to see the server to be able to continously broadcast to all the clients some information ,
ex : say the server is continously trying to update all the clients with current time ....
So, how do we do that, is there a Update() loop of some sort predefined? if not, how do we handle it?
Now, once i've written such a code, how do i deploy this in the server ...... a local server where i can test using the free version., and i should be able to move it to production server without any difficulties at a later time.
Do, i have to compile the server side code into a dll or something, or do i just copy the above c# file somewhere in the server? ......... in anycase, how to do it., step by step?
Ok, say now we deployed the server app, that does the above tasks, now how about calling it from within XNA ......
- 1 ........ what all references do i need to add to the project? (currently im using XNA 3.1 ...)
2. Once the references are added, ...... do we need to setup any login information into the server? or can we connect to it just by calling connect or something ....
In Any case, how to do that in C# , in XNA ?
3. Once such setup is done, i would like to call the below functionality within the game ....
ex: CLient side code ....
int number = 10;
within XNA's Update() loop ......
{
number = server.sendRequest( "DoubleTheNumber", number);
print 'number' to the screen in beautiful colours;
}
............................................................
Please help as much as you can, if you can provide the actual steps ......... pls dont just say read the documents, or google it. Thanks for understanding.Also, is there a online chat option for us aswell? ..... coz explaining and asking these questions can be daunting for both people like me, and also for the gurus who would want to answer these queries ?
thanks in advance