Undertanding client/server stuff


This may be a generic question rather than specific to unity, but .... since im using unity for networking , i guess i can ask it here ...

This question is in line with an earlier query i posted at ... http://answers.unity3d.com/questions/15920/need-lot-of-help-regarding-starting-with-smartfox-server-or-just-any-server

I was able to setup a connection with the smartfox server (when i used smart fox server basic , instead of lite version)

What i want to know is, how to write a script ... which will create a 'zone' ... 'a room' ... and respective user-ids, and passwords .... more importantly how to make it run on the server? so that the client script can make communication with the uploaded server script

Can some one point me where i can get such an information from, or can you provide any sample code, to just send and recieve a message to and from server.... using unity and smallfoxserver ?

Not the answer you want prolly, but Photon does all this and more and rocks with Unity. 9I much prefer it to smallfox)


There are some tutorials provided by the guys from SmartFox, which can be found here. I wrote down my own steps and put those in this tutorial.

Basicly, in these examples you will see how each player sends its position (transform) to the SmartFoxServer (NetworkTransformSender and NetworkTransform script). The SFS then broadcasts these and the NetworkController of each client listens to the SFS. If a transform is received, the NetworkController updates the position of the remote players via the NetworkTransformReceiver script.

You can create rooms and zones by editing the config.xml in the Server directory. If you like to create serverside logic, you can do this with serverside extensions, check the SmartFoxServer documentation on how to do this. @Julian: I started with SmartFoxServer because it has linux support and Photon does not. However, why do you prefer Photon that much to SmartFox?