RPC calls and networked objects in Unity3d

0 votes
Hi!

First I'd like to say that your platform seems superb! It even seems a little under-appreciated compared to the other solutions around. I got the Vikings demo app up and running in no time! Running PC client and Android together, that was very fun! Genious using native sockets to avoid paying $1500 for Android/iOS Pro!

I've grasped the basics on player movement, but I'm unable to find out how to give network functionality to other gameObjects.

I have two players, what if I want them to push a ball around, how can I make the ball update it's position?
And what if I'd like to call a function on the remote player? Play animation X, LoseHealth(50) ?

 

Thank you for any replies!
asked Feb 28, 2014 in AppWarp by erlingn (10 points)
retagged Mar 11, 2014 by shepAdmin

1 Answer

0 votes
If you're using AppWarp cloud - then you'll need to do this on the client itself. So one of the client's can 'spawn' the ball and inform the other client about its initial coordinates and velocity. The other client can then render it on its end with the corresponding velocity. The client which spawned it can then send updates regarding the ball's position/velocity at a fixed rate (the approach is similar to how it sends its own position to the remote).

If you want to control the ball on the server, then you can take a look at our newly launched AppWarpS2 - which is the on-premise game server that allows you to author server side code as well. The unity sample included there illustrates how a character generated from the server is rendered on the client.

http://appwarp.shephertz.com/on-prem/

Sample

https://github.com/shephertz/AppWarpS2Docs/wiki/Walk-through-of-Unity-Viking-Demo
answered Feb 28, 2014 by dhruvc (1,099 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...