Creating a synchronized slideshow
Posted: 29 Nov 2010, 21:00
I'm using the Unity networking engine to handle a few functions as part of my multi-user environment.
One of them is a slideshow. It's a plane with two more to the left and right of it acting as "previous" and "next" buttons. Outside of Smartfox, I have this set up working perfectly. When a client connects, the server updates all connections with the current slide number to make sure everyone sees the same thing. Similarly, when a client clicks the next button, an RPC is sent to the server to increment the current slide number which then updates all clients.
What is the correct way to go about doing this inside smartfox, what conventions do I need to adhere to in order to make this work?
Is there a way to detect when a user connects? Would I script this from inside Unity - it seems unlikely. It makes sense that I'd have to write an external script for the server to process.
Feedback is appreciated.
One of them is a slideshow. It's a plane with two more to the left and right of it acting as "previous" and "next" buttons. Outside of Smartfox, I have this set up working perfectly. When a client connects, the server updates all connections with the current slide number to make sure everyone sees the same thing. Similarly, when a client clicks the next button, an RPC is sent to the server to increment the current slide number which then updates all clients.
What is the correct way to go about doing this inside smartfox, what conventions do I need to adhere to in order to make this work?
Is there a way to detect when a user connects? Would I script this from inside Unity - it seems unlikely. It makes sense that I'd have to write an external script for the server to process.
Feedback is appreciated.