ACTIONSCRIPT FOR MULTIPLAYER GAMES AND VIRTUAL WORLDS PDF

ElectroServer is one of the most-used socket servers for multiplayer Flash content. In this chapter, you will be introduced to concepts and terminology specific to ElectroServer, as well as installing it and writing a simple hello-world application. ElectroServer is free and unrestricted for up to 25 connected users at the same time. You can download and install it at www.

Author:Faegami Motaur
Country:Dominica
Language:English (Spanish)
Genre:Travel
Published (Last):9 July 2012
Pages:306
PDF File Size:9.29 Mb
ePub File Size:6.76 Mb
ISBN:161-2-92579-935-4
Downloads:32608
Price:Free* [*Free Regsitration Required]
Uploader:Kashura



ElectroServer is one of the most-used socket servers for multiplayer Flash content. In this chapter, you will be introduced to concepts and terminology specific to ElectroServer, as well as installing it and writing a simple hello-world application. ElectroServer is free and unrestricted for up to 25 connected users at the same time. You can download and install it at www.

Server Concepts In this section, we look at ElectroServer concepts and some terminology. Most of these concepts are popular and are shared by other servers as well. Since they are generally found in most socket server choices, the concepts described here are useful to learn about beyond ElectroServer itself.

Users A user is a representation of a client connected to the server and logged in. It is possible for a single client to establish more than one connection to the server and still be seen as a single user. Because of that, it should be noted that while a user usually has only one connection to the server, he can have more than one. NOTE The term user is used throughout this book a little loosely. Depending on the context, it may refer to the representation of a connected client on the server, it may be used instead of the term client, or it may refer to the human being who is controlling the client.

Clients are connected to the server. Notice that one client has more than one connection. Rooms A room is a common concept in the realm of socket servers that means a collection of users. In ElectroServer, a room is a way for one to many users to see each other and interact. If a user is in a room, then that user can send a chat message, which is then broadcast to all users in that room.

That is a simple example of the use of a room. A user can be in multiple rooms at a time. Click to view larger image There are two types of rooms in ElectroServer: Persistent—A room that always exists, even if there are no users in it. A persistent room allows users to join and leave at any time. Dynamic—A room that is created for a single use.

When the user list for that room drops to 0, meaning that all users have left, the room is destroyed. This is the most common type of room. Rooms have many uses, the two most common of which are enabling chat and grouping users together to play a multiplayer game.

Both of these common uses are explored in detail in later chapters. Zones A zone is collection of rooms. The concept of zones is mostly valuable as an organization tool for servers with large numbers of rooms. Rooms within a zone must be uniquely named. All users in a room within a zone have access to the room list for that zone.

The user can subscribe to automatic list updates as the list of rooms changes. NOTE Having multiple zones allows for the same room names to be used again and again. If the room list is very large or very active with many rooms being created and destroyed , you may find that connected users may receive too many updates per second to keep up with.

Using more zones is one way to attempt to manage this. Click to view larger image Chat Chat is the primary method by which users interact with each other while connected to a socket server. A chat message is text sent from one user to other users. In ElectroServer, as in many other socket server solutions, there are public and private chat messages.

A public chat message is sent from a user in a room to that room at large—that is, broadcast to all users in that room. Typically, a public chat message would end up being displayed on the client in a text field, such as the one seen below.

NOTE Click to view larger image A private chat message is sent from one user directly to one, or to many, specific other users. Unlike with public messages, the target user does not need to be in the same room as the sender, or in any room at all, for that matter.

Most typically, a private chat message is from just one user to one other user, for example, to hold a private conversation between users in a chat room or to allow for private communication between players on the same team in a game. Many times in multiplayer games and virtual worlds, private messaging happens only between users who are considered buddies. Click to view larger image Buddies Social networking is an enormous part of the typical multiplayer experience. In addition to playing games and competing, users like to form relationships that transcend a single play session.

They like to flag each other as buddies to add to a list. When a user returns to the application on a future session, she sees her buddy list and can tell which of her buddies are currently online and which are not. A user can then message any of her buddies that are currently online and even challenge them to a game. When the offline user returns, he sees the delayed message that was sent. Click to view larger image EsObjects This is the first concept introduced that is truly ElectroServer-specific.

An EsObject is something that may look a little odd at first, but is tremendously useful as you become familiar with it. NOTE The term transaction layer refers to the part of the client and server APIs that handles parsing and formatting data to be exchanged between the client and the server.

It takes data, formats it to be sent over the socket, receives data over the socket, parses it into a usable object, and dispatches an event that can be captured by application-specific code. An EsObject is a class that exists in identical form on both the server and the client.

A new instance of the class is created and data is then stored on this object. The object can then be exchanged between the client and the server easily, because the transaction layer knows how to serialize and deserialize the object. Serialization and deserialization When an object is serialized, that means that the data has been represented in another form that can be used for storage or transport.

It could have been converted to a byte array or a variety of other formats. When it is converted back to the data object, that is called deserialization. EsObjects are used all through the API for client-server communication. Each property that you add to an EsObject has a strict data type.

In the example above, you can see that String, Integer, and String Array are represented.

HERODIAS FLAUBERT PDF

ActionScript for Multiplayer Games and Virtual Worlds

.

DSC PC1500 INSTALLATION MANUAL PDF

ActionScript for Multiplayer Games and Virtual Worlds by Jobe Makar

.

APOLLO GOBO PDF

ActionScript for Multiplayer Games and Virtual Worlds: Introducing ElectroServer

.

Related Articles