Multiplayer Flash Game Tutorial / Flash Games

Multiplayer Flash Game Tutorial

Tutorial: Multiplayer P2P Demo with AS3MUL

A couple months ago I created a simple demo using the . The post has generated very positive feedback and I've also received a few requests for a tutorial so here it is! In this tutorial you will learn how to build a basic multiplayer, p2p application.

The application will function very similarly to the one I to create the application. If you have never used it, now would be a great time to get started! You will also need to download the AS3MUL code. You can do so . Just download the as3mul.zip file and you should be all set. This tutorial is fairly lengthy, but if you don't feel like reading through it all, you can jump to the end and download the source code.

Open up FlashDevelop and choose Create a new project from the project panel. In the box that pops up, select AS3 Project under the ActionScript 3 category. Fill in the project details (name, save location, etc) and click OK to create your project. You'll notice FlashDevelop creates three folders: bin, lib and src. The src folder is where your source code goes. If you open it up, you will see an auto-generated Main.as file.

We're going to add a couple more directories to our src folder. So inside the src folder create two new folders; one named components and another named events. Soon we will be adding class files to these directories, but first, let's also add the as3mul source files. To do this, find the as3mul.zip file you downloaded earlier. This zip actually contains a whole Flash Builder project, but we only need the as3mul code. Unzip the file and go into the multiuser folder. From there, go into the src folder. You should see a folder named com. Copy the com folder and paste it into the src folder that FlashDevelop created for you. Once done, your directory structure should look like the image below.

The Main.as class will contain the bulk of our code, but in order to keep things organized, we're going to add several helper classes that will work together to create our application. We'll start with a simple event class. This class won't contain much code so we can knock it out pretty quickly; let's get to it!

First we need to add the class so right-click on the events folder and choose Add > New Class. The class name is AppEvent. This class will extend the flash.events.Event class so you can either fill in the base class in the dialog box or just add it once the class is created. The entire class is shown below.

package events { import flash.events.Event; public class AppEvent extends Event { public static const NAME_SUBMIT:String = "AppEvent.Name.Submit"; public var data:*; public function AppEvent(type:String, bubbles:Boolean = false, cancel:Boolean = false, inData:* = null) { super(type, bubbles, cancel); data = inData; } } }

You might also like

Tutorial Download Flash Game using Chrome B Indo
Tutorial Download Flash Game using Chrome B Indo
Game Maker 2D Multiplayer Shooting Tutorial part 3
Game Maker 2D Multiplayer Shooting Tutorial part 3

Enabling interaction between 2D and 3D games

by ravenze


TEXT:
Developers of 3D virtual worlds and multiplayer games may soon have access to tools that would allow them to build connected, promotional 2D, Flash versions of the same games.
These new tools are at the heart of Battle, a simple Flash game being released Thursday by the Multiverse Network, a virtual worlds middleware company.
A simple Flash game that runs on Facebook, MySpace, Friendster, and Kongregate, Battle is really the showpiece behind new Multiverse technology that could, for the first time, make it possible for developers using its platform to build full-scale downloadable, virtual worlds or online games to create scaled-down, 2D, browser-based versions of the same titles and let players compete between them

Pupil's BAFTA bid pride  — Blackpool Gazette
James's 'Soot and Smog' game sees the player roam around Victorian London aiming to raise funds to help their sick sister by completing various challenges, while different facts about that era of history flash up on the screen.

Adobe Flash Player 12 Is All Set to Provide Hassle Free Internet Browsing ..  — The Fuse Joplin
Another key feature that makes installing this flash player the preferred choice of millions of people all over the world is that it is available for free. Adobe Flash Player 12 is ..

NRL to act on “illegal” betting  — Fox Sports
Following a two-month investigation, the NRL's Integrity Unit is close to determining their findings after auditing the betting records of registered players and officials from the NRL, NSW Cup and under-20s Holden Cup competition.

focus The Settlers: Rise of an Empire
Video Games (focus)
  • Create big, bustling medieval cities in a highly detailed world
  • Build a strong economy by gathering resources and employing Settlers wisely
  • Single player campaign, freeplay mode, multiplayer options and map editor
  • Four climate zones - seasonal and weather changes will affect the way you play
  • Flash: New! Male and female Settlers can fall in love and marry.