Multiplayer game

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

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.

Similar Messages

  • How to create a multiplayer game for steam using flash/flex?

    Hi guys,
    We've got a multiplayer game ready to go. Currently it is not multiplayer, but we'd like to get it to a stage where it can be played over the steam network by users of steam and owners of steam games.
    We'd like to if anyone could briefly give us a breakdown of how to get out game up on steam and available for multiplayer?
    Does steam host servers, and can we utilise a steam server to transfer data between players or would we have to run our own server?
    Currently were using flash builder to publish via adobe air to a windows desktop exe. Can anyone briefly explain how - once a player has downloaded the game from steam we can connect two players? Does anyone know how to use actionscript 3 to access steam network?
    Anyone have any experience developing multiplayer turn based game for steam using flash /actionscript 3 /adobe air?
    Thanks for your help in advance,
    i

    You would want to use the SteamWorks API, which is available from Steam as a C++ library, but there is most likely an Adobe Native Extension (ANE) that would allow you to use the library in AS3.
    I've never used SteamWorks but it seems to support peer-2-peer matchmaking (in other words, you wouldn't even need your own server, I think.)
    SteamWorks API:
    https://partner.steamgames.com/documentation/api
    Search results for "SteamWorks AIR ANE":
    https://www.google.com/search?q=steamworks+air+ane
    -Aaron

  • How do I set up my Airport Extreme to best use multiplayer games locally

    How do I set up my Airport Extreme to best use multiplayer games with my family. Everyone is located in the same house and uses the same router.
    I have tried a few games but have not  successfully connected  2 players

    That is a weird question, as your GAMES could be interpreted a hundred different ways. Are we talking about third party devices here or what?

  • Building P2P Multiplayer Games | MAX 2010 Develop | Adobe TV

    Learn how you can leverage peer-to-peer communication in Adobe Flash Player to enable multiplayer games on Facebook. This session will include an in-depth tutorial on peer-to-peer technology, a demo of how to use peer to peer in your games with Adobe Flash Builder and Flash Professional CS5, and deployment on the Facebook platform.
    http://adobe.ly/zRYemH

    Is there a transcript of this?

  • How to put pause in a multiplayer game on Texas Hold'em?

    Anybody knows???

    I don't know if you can pause the multiplayer game, you might have to start over. If the normal method of touching 2 corners doesn't work I expect there is no way.

  • Tool to help you write multiplayer games

    I have created a tool to help Flash developers interested in
    writing multiplayer games. It should take care of a lot of the
    details of communicating with sockets, enabling you to focus on
    your game code. Advanced Actionscript and PHP coding skills are
    required:
    http://flashmog.net

    Apps have reviews.  Check the reviews from the public and get a sense of quality from them.

  • A never ending multiplayer game?

    Hi
    I want to make a 2d spaceship multiplayer game (applet). The game should have lots of human controlled spaceships (and maybe some computer controlled spaceships if there are no human players). Each time a new user starts a game in its web browser, a new spaceship will appear in the game. The user will play until his spaceship is shot by another player. A shot spaceship will disappear from the game, and the player may choose to start a new game with a new spaceship. But the game on the server should never end. Each user will play in the same game on the server (but there may be a maximum number of players).
    Is it possible to make a game that never ends? Which requirements apply to the server? Is it possible to use a normal web server (you have only FTP access to the server computer)?

    this is a fast extract from my files, when you run Gclient the server will be launched and 2 clients will be opend, the red boxes are players
    using the mouse you move the box, the change of location is propagate thru the server.
    Server
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class Gserver
         private int    players = 0;
         private Vector ones = new Vector();
    public Gserver() 
         ServerSocket servS;
         Socket       clnt;
         try
             servS = new ServerSocket(4444);
              System.out.println("Server Ready on port: 4444");
              while(true)
                   clnt = servS.accept();
                   System.out.println(""+clnt);
                   One one = new One(clnt);
                   one.start();
         catch (IOException ex) {System.out.println(""+ex);}
    public void sendToAll(String s)
         for (int i=0; i < ones.size(); i++)
              One one = (One)ones.get(i);
              one.write(s);
    public void sendToOne(One me)
         for (int i=0; i < ones.size(); i++)
              One one = (One)ones.get(i);
              me.write(one.data);
    public class One extends Thread
         private Socket         socket;
         private BufferedReader in;
         private PrintStream    out;
         public  String         data;
    public One(Socket socket)  
         this.socket = socket;
    public void run()
         try
              out  = new PrintStream(socket.getOutputStream());
              in   = new BufferedReader(new InputStreamReader(socket.getInputStream()));
              ones.add(this);
              players++;
              int x = players*30-25;
              data = "P"+players+","+x+","+x+",";
              sendToAll(data);
              sendToOne(this);
              while ((data = in.readLine()) != null)
                  sendToAll(data);
         catch (IOException e) {System.out.println("one!!"+e);}
         close();
         ones.remove(this);
    public void write(String s)
         if (out != null)
              out.println(s);
              out.flush();
    public void close()
         if (socket == null) return;
         try
              if (socket != null) socket.close();
              if (in     != null) in.close();
              if (out    != null) out.close();
         catch (IOException e){}
         socket = null;
         in     = null;
         out    = null;
    public static void main (String[] args) 
         new Gserver();
    client GUI
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.util.*;
    public class Gclient extends JFrame implements KeyListener
         private Component me;
         private Container co;
         private Gsocket   socket;
    public Gclient()  
         super("Glient");
         setBounds(1,1,500,200);
         addWindowListener(new WindowAdapter()
        {     public void windowClosing(WindowEvent ev)
                   if (socket != null) socket.close();
                   dispose();     
                   System.exit(0);
         co = (Container)getContentPane();
         co.setLayout(null);
         co.setBackground(Color.black);
         addKeyListener(this);
         requestFocus();
         setVisible(true);
         if (socket == null)
              socket = new Gsocket(this);       
              if (!socket.isConnected())
                   dispose();     
                   System.exit(0);
              else socket.start();
    public void keyTyped(KeyEvent ke){}
    public void keyPressed(KeyEvent ke)
         int kc = ke.getKeyCode();
         if (me == null) return;
         Point o = me.getLocation();
         Point p = me.getLocation();
         if (kc == 40) p.y++;
         if (kc == 39) p.x++;
         if (kc == 38) p.y--;
         if (kc == 37) p.x--;
         if (!p.equals(o)) socket.write(me.getName()+","+p.x+","+p.y+",");
    public void keyReleased(KeyEvent ke){}
    public void go(String s)
         StringTokenizer tokn = new StringTokenizer(s.trim(),",");
         String p = tokn.nextToken();
         int    x = 0;
         int    y = 0;
         try
              x = Integer.parseInt(tokn.nextToken());
              y = Integer.parseInt(tokn.nextToken());
         catch(NumberFormatException e){}
         Component com = null;
         for (int i=0; i < co.getComponentCount(); i++)
              if (co.getComponent(i).getName().equals(p)) com = co.getComponent(i);
         if (com == null)
              JLabel l = new JLabel(p);     
              co.add(l);
              l.setName(p);
              l.setOpaque(true);
              l.setBackground(Color.red);
              l.setHorizontalAlignment(SwingConstants.CENTER);
              com = l;
              co.validate();
              if (me == null)
                   me=l;
                   setTitle(p);
         com.setLocation(x,y);
         co.repaint();
    public static void main (String[] args)
         Thread t = new Thread()
             public void run()
                   new Gserver();
         t.start();
         Gclient a = new Gclient();
         Gclient b = new Gclient();
         b.setLocation(b.getX(),b.getY()+220);
    client socket
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.*;
    import java.net.*;
    import java.io.*;
    public class Gsocket extends Thread
         private Gclient        client;
         public  String         host;//  = "10.20.2.58";
         private int            port  = 4444;
           private Socket         socket;
         private PrintStream    out;
         private BufferedReader in;
    public Gsocket(Gclient client)  
         this.client = client;
         port = 4444;
         try
              InetAddress ia = InetAddress.getLocalHost();
              host = ia.getHostName();
         catch (UnknownHostException ex)
         try
              socket = new Socket(host,port);
              out    = new PrintStream(socket.getOutputStream());
              in     = new BufferedReader(new InputStreamReader(socket.getInputStream()));
         catch(IOException ex)
              socket = null;
    public boolean isConnected()
         if (socket == null) return(false);
              else            return(true);
    public void run()
         try
              String data;
              while ((data = in.readLine()) != null)
                   client.go(data);
         catch(IOException ex)
         close();
    public void write(String s)
         out.println(s);
    public void close()
         try
              if (socket != null)     socket.close();
              if (in     != null) in.close();
              if (out    != null) out.close();
         catch (IOException e){}
         socket = null;
         in     = null;
         out    = null;
    }Noah

  • Multiplayer game programming - Code of a basic server

    I'm a beginner in multiplayer game programming and I'm looking for the code of a basic server for a multiplayer game. I don't mind which kind of game (I mean: chess, ping-pong, battlenet...) The important thing is the code pattern abnd the server structure.
    Could anyone help me?

    If you want to have a look at a generic multi-threaded server, check out the Java networking tutorial.. there's a basic example server that responds to a "Knock knock, who's there?" conversation.. you can start off with it..
    Of course it's not a game server but you could try sticking in a game engine to maintain the game world and change the user sessions to a proper game protocol.. e.g. sending key strokes or joystick movements. You could also get the server to send player and enemy positions etc...
    Good luck!

  • Full List Of iPad to iPad Multiplayer Games?

    Two friends of mine both have iPads. They want to know what games are available on the App Store that they can play together, in 2-player mode where each player has their own iPad. I tried searching on Google for an answer, but only found old outdated content.
    Can anyone help?

    I did a Google search using multiplayer games 2 ipads.
    Here's a start http://thenextweb.com/apps/2011/04/30/the-40-best-multiplayer-games-for-iphone-a nd-ipad/
     Cheers, Tom

  • Can someone point in the right direction for how to make a multiplayer game over the internet

    Hello,
    I am looking into making a game where two people who can be in different places would log on to the app, log in and can play - i.e. they would be connected over the internet. I'm looking for a hint on what is the direction to take and which technologies.
    For example is there a best practice for example if you make an app with DirectX and C++, and you use some kind of web service or something? or is it easier using C# and XNA? just looking for some pointers in the right direction. I have played around
    with DirectX, far from proficient but have familiarity, I have no experience with XNA but hear it's less hardcore and easier going. I'm particularly interested in what the best way to connect over the internet.
    Thanks

    What you are asking is very complicated and one of the more difficult things you can do in gaming. I'd strongly recommend you start smaller to learn and then move up to multi-player games as your skills grow.
    From the multiplayer client perspective it doesn't really matter which technology you use. You can write a multiplayer game in any engine or technology that can talk to the network. Choose the client technology that you are most adept at and interested in
    and learn it. You can go straight to DX, use a third party library such as Monogame (XNA isn't supported for Windows Store apps), or a complete game engine such as Unity. Once you can write a decent one-player game you'll have the foundation to start on to
    build a two-player game.
    At that point you'll need to define the problem much more specifically. As you state it, it is really wide open. How do you want the users to connect? Directly machine to machine? Matched through a web server but running client side? Connecting to a game
    running on a remote server? Something else?
    The network connection itself is probably fairly straightforward, but where to connect and how to manage that can be difficult. You'll have to decide what properties you want. Is this an action game where responsiveness is important or
    a turn based game where timing is less relevant?
    Are the players connecting locally or completely remotely? If the former then they can probably connect directly over the local network (NFC is great here). If the latter then they probably will need to connect to a matchmaker service to avoid firewalls.
    This can get very complex, but there are existing solutions you can use rather than writing your own.
    --Rob

  • You are not allowed to play multiplayer games on this device

    I can not play multiple games. I've searched for a solution and saw that
    The solution is in general-restrictions-enable restrictions-enable multiplayer games.
    But, multiplayer games and adding friends sections are greyed out! I can not enable them.
    How can I enable them ? Why they are greyed out ?!

    If your iPhone was provided by your company or another organization or is being managed by them (perhaps as part of connecting to the company's email system), they may have those features disabled. If that's the case, that's an issue you'd have to take up with your company.
    Regards.

  • Making a multiplayer game

    I am planning on making a multiplayer game, but the thing is
    i have never made one before. I can use java with flash if that
    helps. Does anyone know a tutorials i can use to help me learn.
    Thank You

    use google to search for tutorials.

  • Unable to play online multiplayer games!?

    Whenever I go to play Town of Salem (online multiplayer game) or even any other gaming websites, it takes me to a page stating that I need to update my Flash Player to a version 11.9? or higher even though (triple checking regularly) my flash player is on version 17.1.1. I have uninstalled and reinstalled my flash player 4 times now and it still doesn't work and my Firefox is up to date too. Not too sure whether it is a problem on my side or just the flash player doesn't like playing games on my laptop anymore.
    If it helps, I have another laptop (different brand) that has updated flash player and it plays games really smoothly.

    Manufacturer: Acer
    Model: Aspire 5253G
    Processor: AMD E-350
                    Processor 1.60 GHz
    Installed memory RAM:  4.00GB (3.73 GB usable)
    System Typer: 64-bit Operating System
    Flash Player Version: 17.0.0.169
    Your OS: Windows 7 (64bit)
    Your Browser: Mozilla Firefox, 37.0.2 (latest update)
    My sister has also told me she had a very similar problem only that it was facebook games that weren't working. She fixed the problem by switching some option "on" that was turned off by someone else.

  • Multiplayer game applet

    Hi,
    I'm currently developping a multiplayer game as a personnal project. I thought of applet as an ideal mean of making this available easily from anywhere.
    I designed the game, developped the core game code, and made a quick GUI. Then came the time to plug that together with a communication protocol.
    Applets can only connect to the server it was downloaded from. No problem there, I can run the game server on the http server (the DB's there anyway).
    I thought about RMI, but my first tests, although totally successful on my LAN, proved a nightmare when crossing the little familiar boundaries of my home network.
    So I was wondering about writing my communication code using sockets instead and controlling my own game data frames.
    So my question is, from your experience, what would you do to communicate between an applet and a server? RMI or sockets? Is there anything else which I haven't considered?
    From what I read, RMI would require me to make the user install a policy file on their local disk, which is out of question.
    Most communications will be initiated by the client, hence why I chose RMI, but I would have ideally to make some communications on the other side. Sockets would allow this two way communication, but from what I understood, it wouldn't work using RMI because this would mean for the applet to start a rmiregistry and listen on some ports?
    I would really appreciate your input on which way I should head for my communication layer, which pitfalls awaits me and where I can get more details from similar projects.
    Thanks!

    Thanks for your input.
    My problem is that I'm an utopist and want my game accessible to the most people possible. Everybody has a browser, but not everyone has web-start.
    Having to install web-start or a policy file on their system might turn off some potential players from giving it a try. And in some environment, it may be simply impossible (my university's network admin won't let me install web-start, and this is the case in many other places for sure).
    The sandbox is not a problem to me since I can run the game server from the http server and only connect to the server the applet was served from.

  • Multiplayer Game Theory using P2P

    Hello. I was wondering if anyone could shed some light on how to go about creating a realtime multiplayer game using p2p.
    Traditionally clients connect to a server, they make rooms, join rooms and start a game. Clients send data to a server, the server processes this data and sends it back to all clients. The server also processes game logic to keep clients in sync. The main job of a client is to render the world the server is processing and send updates about itself.
    Now, when it comes to p2p there is no server to manage the game. So how do you go about creating a game where all clients need to stay in sync and no cheating can occur?
    One method I can only think of is using a host system. For example, all players connect to each other, they are all clients. Each client does some small tests in order to determine the best location for the host so all clients have good latency with each other. After this communication a host is selected out of the clients and will process the game information. All clients are notified of this host and send updates to that host only. The host receives the updates and sends them out to every other client. The host determines game state so every other client only needs to worry about rendering the world. Clients also manage lag by doing some interpolation and guess work on positions etc. When the host leaves / disconnects another host must be selected and the current state of the world is set to whatever that client has rendered.
    I think that method could work, the only problem is the host could cheat, one way around this might be to swap hosts every so often so no client can determine if they are the host or not. If all clients cheat then good for them :). Other than that the only option is to use a RTMP server, but this would negate the speed benefits that comes with RTMFP.
    I'm quite new to this new network stuff so if what I say is completly wrong then please let me know, I would also love to hear any other suggestions you guys have. I know a lot of new things have been added such as multicast and groups, but I don't know enough about them to relate here.
    Thanks.

    Designating a "host" client is in no way better than the traditional sever/clients model due to the following:
    a. you would have to either direct connect each peer to the host, which is innefficient for large groups and not always possible(see NAT issues), or route messages to the host which may turn out to be slow
    b. average latency of clients-to-server vs one-client-to-all-the-others should be in favor of the former, given that a server is generally connected to a network backbone
    c. individual P2P connections may fail and/or the group may "rewire" itself at any time so detecting when the host leaves is tricky; not to mention efficiently designating the host, rocket science may be easier
    ...and more
    The way I see it, you have the following options:
    1. Build it entirely distributed:
    -each peer posts individual updates to the group
    -everybody listens to all updateds and creates own copy of the state; processing overhead should be no bigger for any peer than if it had to be the host
    -have the model loss resilient; some individiual updates may be lost to some, further messages have to be self-sufficient (i.e. declare absolute grid positions not step movement); timestamp every message, they may even arrive in reverse order
    -obfuscate the data model to give cheaters a hard time; keep a backup (yet more obfuscated) data model and swap if the current is compromised; have each peer be suspicious about every update, as if it was the server and maybe report suspected illegal moves
    2. Use RTMFP unicast with FMIS4(the $4.5k one)
    -same client/server model as RTMP
    -managed, no way to cheat (or is there?)
    -lowest latency due to RTMFP yet slightly increased overhead due to encryption
    -RTMP fallback may still be needed for some with firewalled UDP
    3. Use a hybrid of managed and distributed architecture
    -connect peers to the server and also with each-other into the mesh
    -manage security at server level
    -peers send frequent updates to both server and mesh
    -peers receive frequent updates from the mesh yet unfrequent updates from the server; server copy of the state is both a backup for data loss in the mesh and a doublecheck of data integrity
    -whichever individual piece of information is received earlier, via either mesh or server is assimilated to the local state and rendered
    -have peers that have low latency in the mesh request server to update them more often
    The choice from above depends a lot on the specifics of the application, maximum group size(for P2P bigger is better, huge is awesome), requested latency, reliability and security.
    Good luck.

  • Online Multiplayer Games

    I know how to make simple single player java applets...
    but how do I make online multiplayer games?
    Is there a specific API or something? Where can I get some tutorials?
    Thanks.
    Edited by: Tekton on May 10, 2009 10:04 AM

    In my opinion, anyone wanting to get into game network programming should start here:
    http://www.gamedev.net/community/forums/showfaq.asp?forum_id=15
    it may not apply fully to java network programming, but this faq might bring some very important key concepts to your attention that you had no clue existed.

Maybe you are looking for

  • No Photobooth after hard drive replacement

    Wasn't sure if this is the right place to ask this question, but a couple of days ago the hard drive had to be replaced on my macbook and i have just noticed that there is no photobooth icon in the dock. I have searched using spotlight and looked in

  • Differences between object and object references

    What's the differences between object and object references? To me, it seems the same, but I am sure there are differences. Student s = new Student("Joe",20); s is an object of class Student. Can we say s is an object reference of class Student? Plea

  • MSN MESSENGER probelms please help!

    Hello. I have msn messenger for mac and EVERY SINGLE TIME I SIGN ON there are always requests that show up OVER AND OVER again after I have accepted them a million times!!! And now when people sign on I don't even know that they did! and I checked th

  • I need help in My Back up area for my Iphone

    I need to remove an Old Back file in My Itunes account so I can have a New Back up restore as I have tried to make a new Back up but when after I do It still shows an old 2009 and 2010 Back up save not the new one can anyone help me ??

  • Hierarchy display issue

    Hi folks!, we are displaying Funds Centers using a hierarchy. The problem is that if we select Key and Text for display option of Funds Center we get 3 columns on the web (Key, Text, Key). And if we select Text and Key we get only key, so I guess it'