so far using unity 3d version 3.4.1 i'm able to connect to smartfox all from scratch now my main problem would be learning how to send messages between the server and the client, any way of doint it withouth a extension like a non authorative setup? the fps tutorial doesn't goes in detail very much and class serialization seems pretty hard to understand, i can't manage to make it so the client spawns the player and such.
this is just a simple asteroids game by the way. trying to learn smartfox somehow.
anyone knows of a simple way of sending messages?
anyone knows of a simple way of sending messages?
get to work you slacker!!!
i'm a bit confused, so far every one always guides you to the manual, but no help about it. i'm asking here because the manual doesn't seem easy enough to understand and the fps tutorials doesn't seems enough.
so far all i know is that you need isfsobjects to send messages back and forth and class serialization but seems kind of weird to get the concept. so that's why i asked about trying to find somehow a way of making it to where i shouldn't have to code the extension. so far the most i can get is connecting to the zone and the room and of course login but then after that how can i send my transform? spawn and etc? withouth having to make or try to figure out how to make a server world model and such. pretty much i mean that the fps tutorial seems to advanced for me. i'm trying to learn from the ground up. it's hard trying to see both the server code and the unity client code already.
so far all i know is that you need isfsobjects to send messages back and forth and class serialization but seems kind of weird to get the concept. so that's why i asked about trying to find somehow a way of making it to where i shouldn't have to code the extension. so far the most i can get is connecting to the zone and the room and of course login but then after that how can i send my transform? spawn and etc? withouth having to make or try to figure out how to make a server world model and such. pretty much i mean that the fps tutorial seems to advanced for me. i'm trying to learn from the ground up. it's hard trying to see both the server code and the unity client code already.
get to work you slacker!!!
so far the only thing about sending messages are about things like chatting such as public message and the rest is sfsobjectswhich seems to need some kind of extension to work, even the api manual seems a bit empty like it doesn't show examples of usage or anything.
but still i'm just trying to figure out how to send messages back and for between the clients withouth having to use an extension and i don't only mean chatting i mean pretty much having it a non authorative set up at least for learning purposes
but still i'm just trying to figure out how to send messages back and for between the clients withouth having to use an extension and i don't only mean chatting i mean pretty much having it a non authorative set up at least for learning purposes
get to work you slacker!!!
If you need to send custom data from one client to one or more others, you can use the ObjectMessageRequest from the Sfs2X.Requests namespace (see the API documentation here).
It doesn't require you to create a server-side Extension, or use class serialization (which, by the way, it is mainly used to send custom classes from the client to the server, not from the client to other clients).
It doesn't require you to create a server-side Extension, or use class serialization (which, by the way, it is mainly used to send custom classes from the client to the server, not from the client to other clients).
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
If you take some time to read the documentation at http://docs2x.smartfoxserver.com/ you will have a better understanding of how SFS works.
In particular mani Requests have their counterpart Event. So when you send an ObjectMessageRequest, the other clients will receive a SFSEvent of type OBJECT_MESSAGE. You have to listen to that event and take the appropriate actions.
About the SFSObject instance you have to use to pass data, read this document: http://docs2x.smartfoxserver.com/DevelopmentBasics/sfsobject-sfsarray
Even if examples show a different language, the usage is exactly the same on all the platforms.
In particular mani Requests have their counterpart Event. So when you send an ObjectMessageRequest, the other clients will receive a SFSEvent of type OBJECT_MESSAGE. You have to listen to that event and take the appropriate actions.
About the SFSObject instance you have to use to pass data, read this document: http://docs2x.smartfoxserver.com/DevelopmentBasics/sfsobject-sfsarray
Even if examples show a different language, the usage is exactly the same on all the platforms.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
You keep complaining about people telling you to read the doc, but it seems you are not doing it at all!
In the C# API doc, SFSEvent class, OBJECT_MESSAGE field (link to API doc), you have a clear example about handling the mentioned event.
Also, all the examples (starting from the most basic ones up to the FPS tutorial) show that all the requests - just like the ObjectMessageRequest (link to API doc) - must be sent using the SmartFox.send method (link to API doc).
After all it seems there is a reason why we keep telling you to READ THE DOC and check the basic examples provided in the SFS2X package!
In the C# API doc, SFSEvent class, OBJECT_MESSAGE field (link to API doc), you have a clear example about handling the mentioned event.
Also, all the examples (starting from the most basic ones up to the FPS tutorial) show that all the requests - just like the ObjectMessageRequest (link to API doc) - must be sent using the SmartFox.send method (link to API doc).
After all it seems there is a reason why we keep telling you to READ THE DOC and check the basic examples provided in the SFS2X package!
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Who is online
Users browsing this forum: No registered users and 28 guests