How to Create Multiplayer Networking Games

Multiplayer network games allow you and your friends to create and play games over private networks, such as in your home, or over public networks, such as the Internet. Creating a multiplayer game, however is involved. First you need to download server development software, then you will have to create a user interface, create the client side program and then create the server side program. Fundamental to the creation of multiplayer games is a solid knowledge of Adobe Flash Media Server, Adobe Flash Professional as well as the flash ActionScript 3.0 and ActionScript server side languages.

Things You'll Need

  • Web hosting service
  • Adobe Flash Media Server software
  • Two Internet-connected computers
Show More

Instructions

    • 1

      Review the multiplayer platform installation documentation for Adobe's Flash Media Server platform. Download the platform and all the associated development kits that are needed to develop your multiplayer game according to the in-depth instructions. Obtain a Web hosting service that provides for Flash Media Server support. Use an official Adobe Flash Media Server Partner.

    • 2

      Create a simple multiplayer game on paper. Use just two objects, one that represents Player 1 and another that represents Player 2. Define the program such that when the Player 1 presses the player 1 button, the button turns green on Player1's screen and Player 2's screen.

    • 3

      Start Flash and "Click" Flash File (ActionScript 3.0) to create your client side program. Enter the name "MultiplayerGame" in the "Document" field in the "Properties" Panel. Click the "Save" option in the file menu and save the client side program with the name, "Player" to make a Player.fla file. Use this file to type the Flash ActionScript commands for the client side program. Click the "New" option from the file menu and click the advanced communications file. Click the "Save" option from the file menu and save the server side program with the name "PlayServer" to make the PlayServer.asc file. Use this file to type your server side commands into.

    • 4

      Click the "Player.fla" in the window menu to add a button the Player.fla file. Click the "component" option from the window menu. Now click the button icon from the component library list box that appears. Drag the button to the stage to the position you want. Type in "player1" into the "instance name" box in the properties panel.

    • 5

      Click the "Actions" option in the window menu so you can type commands into the "Action" editor. Use the addEventListener command to assign a mouse click event to the player1 button. Use this event listener to call a function called "serverconnect" when the player button is clicked. Use a command syntax that is similar to player1.addEventListener(MouseEvent.CLICK, serverconnect).

    • 6

      Write the commands in the serverconnect function to call a function called "colorobject" within the server file, PlayServer.asc. Use this name in the NetConnection method to access the "colorobject function," a function that will be typed into the server side file, PlayServer.asc.

    • 7

      Write the client program such that the action selected, the click of the mouse, will be relayed to the server side program file. Write the commands such that the client side program will read a number that is generated within the server side program in response to receiving a mouse click variable. Write the commands in the client file to indicate which color to color the player1 button with once it has received the number from the server.

    • 8

      Click the "PlayServer" option in the window menu to open the server side file, PlayServer.asc. Click the "Actions" option in the window menu. Type in the server side commands along with the colorobject function commands. Write the program such that when the player1 button is selected, the server side program will send a request to the client side (player) program to change the color of the player button.

Learnify Hub © www.0685.com All Rights Reserved