Skip to main content
October 25, 2007
Question

multiplayer game

  • October 25, 2007
  • 7 replies
  • 636 views
hi, i develop in flash 8 (AS2) a car game where i run a race with 1 car.
i want to transform this game into multiplaeyr with media server, can someone give me an idea on what do i need to do ??

thanks.

any help will be glad
    This topic has been closed for replies.

    7 replies

    February 20, 2008
    well....
    i used 1 sharedobject per car.
    but then i encounter a problem, that was some cars disappear

    i solved the problem using so.setFPS( )

    thanks for your help
    February 15, 2008
    any advice about this ???
    January 11, 2008
    hi, i want an advice.
    i will have 20 cars, in the game.
    in your example i see you generate 2 sharedobjects.
    i think i will generate the sharedobject in the server (just thinking)

    i need to have _x and _y of the car.

    what do you think is better, to have an object (the car) with his x and y position, every car in 1 sharedobject

    or to have one big array of object ???

    hope you can help me with this.

    thanks
    January 8, 2008
    thanks man...
    your sample makes me an idea on how to work with this.. now i have my game running...
    i have 20 opponents racing a track at same time..
    now i have another big problem that i dont imagine how to resolve.

    i need a list of position of the players, the player in first place is : the second place : and so on...

    the game is something similar to: http://www.miniclip.com/games/rural-racer/es/

    lets say is the same view of the track, but the track is biger, how can i know in which place are all players ???
    November 20, 2007
    thanks man, i will check the xample you send me.
    thanks a lot
    November 14, 2007
    the game i want to develop with FMS, is a multiplayer game in which is a car racing.
    game, where people ran arround a track and i want to have a list of in which place they are and other people can log only to see the race.

    hope someone give me some ideas
    Participant
    November 19, 2007
    i use this method in one of my games:
    create the two objects.
    create the net connection for the two objects.
    so now the two objects behave exactly the same in all swf instances.
    now to determine who controls what object i used third party program to create a session in the client computer depending on their user name.
    then used the user name to determine who controls what with a simple ' if ' statement in my action script.
    hope that was helpful.
    Participating Frequently
    November 13, 2007
    We don't really have enough info on your game to help you.

    But the basic concept of multiplayer is the following :

    -Server centralizes all information on all players at all times
    -Players regularily send info about their status
    -Server regularily send status info received to all others players.

    Then, to optimize ressources, status updates should be as rare as possible.
    An example : instead of transmitting the car's position all the time, you could just transmit when a player turns left or turns right, and the game can update itself on the clients side thanks to this.
    Position is only sent sometimes to make sure the status calculated this way matches the real one.
    This method is called "dead reckoning", wikipedia has a nice article about it.

    Good luck, multiplayer is always very though to code.