Discussion list for Unity developers.
unity-dev at moock.org
Fri Feb 23 02:39:44 CST 2007
Thanks a lot!!, The explanation confirm our suspicions.. We have made 4/8 multiplayer games! :-) I can't put the url because the portal to wich it belongs is private and It's protected. Sorry :(, but no problem I think we are going to develop more multiplayer games... We have understood a lot of things about Unity, and now is easier for us to develop with it, the power of RemoteClient, getRoomManager... :-) Thanks again, Marcos. P.D. Another generic question is comming... ;-) ----- Original Message ----- From: "Discussion list for Unity developers." <unity-dev at moock.org> To: <unity-dev at moock.org> Sent: Thursday, February 22, 2007 8:07 AM Subject: Re: ||unity-dev|| Diferences between invokeOnRomm andsetClientAttribute >> We have made our first multiplayer game! yeap!!! :-) > -- > congratulations! Do you have a URL? > >> All it's ok, but in some cases we think we are not using Unity correctly. >> We know Unity is based on a MVC Pattern, but in some situations we don't >> see clearly which is the model, the view or the controler (almost always >> in the client part). The most problematic to understand for us is the >> mission of the class that extends Uclient. > -- > not all of uclient is mvc. the client-side room architecture is mostly > mvc, with the URoom acting as the model and URoomView acting as the view > (and often also the controller). > > in complex applications, you're probably best off making UClient a > simple proxy class that forwards work on to other classes (perhaps rooms). > > in very simple applications, you can theoretically just dump your logic > and display code into UClient, but that is not a recommended practice. > >> What are the differences between invokeOnRoom and setClientAttribute? >> What are the situations to use one or another? What are the criterions to >> select invokeOnRoom or setClientAttribute? > == > the invokeOn* methods are used to send individual commands to other > clients. the set*Attribute methods are used to set enduring > characteristics on clients and rooms. for example, to send a private > chat message to a user, you would use invokeOnClient(). but to change a > client's hair color, you'd use setClientAttribute(). > >> An example: >> I want to send a message to all clients connected. Each client have to >> detect this message, and processing it in his view (like a graphic chat). >> I think this example requires invokeOnRoom, but is possible to do it with >> setClientAttribute... > -- > you should use invokeOnRoom() unless you want to retain the information > so that other clients automatically see it when they connect. > > think of the invokeOn* methods as methods and the set*Attribute methods > as variables. > > colin > -- > you're a unity-dev subscriber. to unsubscribe, visit > www.moock.org/mailman/listinfo/unity-dev/ > > superb hosting for this list and moock.org is generously provided by > Rackspace. See: http://www.rackspace.com/?supbid=moock > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.441 / Virus Database: 268.18.3/696 - Release Date: 21/02/2007 > 15:19 >