Skip to main content
Participating Frequently
July 3, 2009
Question

Shared Ball example works poorly! Is this the best FMS can do?

  • July 3, 2009
  • 1 reply
  • 1768 views

I used AS2 to recreate the shared ball example ( a simplified version) but the ball is really jerky. I've set so.setFps(60) and it's just as bad. The active client is only updated when the mouse stops (the ball simply follows the mouse in my version) and the receiving client is very jerky even with swf framerate set to 60fps! Any suggestions? Or is FMS just for video (I don't plan to recreate Youtube)? I am really disappointed and frustrated.

Thanks for any suggestions

    This topic has been closed for replies.

    1 reply

    Participant
    July 4, 2009

    I can understand your frustration. I haven't used AS2 in a while but can you tell me more about how YOUR code works? I think basically you would set a callback for SharedObject.onSync = myFunctionName.

    then define your sync function elsewhere like function myFunctionName(){...}

    hope this helps

    Participating Frequently
    July 4, 2009

    Thanks, Lisa, but I have tried that. The code is simple:

    1. connect to the server: nc = new netconnection
    2. nc.connect(url)
    3. so = SharedObject.getRemote(nc)
    4. so.onSync = function(list){ //update ball.xy here}
    5. and that's it!

    I don't know what else is there to do. It works, just very poorly. I've scoured the docs and can't seem to find any alternatives. The server performance shows mem/CPU usage so low it's not even registering. Bandwidth is also very low as the client is being tested on the development server. I've written realtime multiplayer-code using PHP that performed better! and that was on a shared hosted server that I didn't control that was "who-knows-where." Is it because I'm using the free development server? I need to impress my supervisor before I can recommend this product or we're going back to open source. I hope not because FMS is easier to code.

    Any other suggestions are welcome. Thanks

    July 4, 2009

    How are you making the updates to the shared object on the client side? It would be helpful if you post the code you're using.

    I personally don't like to rely on constant SO updates to create fluid motion, as you can't count on all clients receiving updates fast enough to keep the motion smooth (you end up with jittery movement in a lot of cases). I prefer to make less frequent updates, and use tweens on the client side to smooth out the movement.