les2222

42
Web Game Design 授授授授 授授授

Upload: caviar7571

Post on 27-Jun-2015

594 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Les2222

Web Game Design

授課教師 江素貞

Page 2: Les2222

Server Introduction

Page 3: Les2222

ElectroServer 4ElectroServer is free and unrestricted for up to 25

connected users (at the same time). You can download and install it at www.electro-server.com/downloads.aspx.

Page 4: Les2222

ElectroServer 4 概述ElectroServer works by allowing client applications, such

as Flash, Java, or Silverlight, to connect via socket to it and log in.

The server is highly extensible using what are called extensions. An extension is a collection of 1 or more ActionScript or Java files/classes that are used to add more functionality to the server.

Page 5: Les2222

ElectroServer 4 FeaturesUnlike any other socket-server platform, ES4 moves

beyond simple multiplayer game development, combining the support of streaming Audio/Video to enable A/V conferencing, recording, and streaming live events to thousands of users.

Page 6: Les2222

ElectroServer 4 FeaturesUnprecedented Scalability

ElectroServer 4 has the ability to support hundreds of thousands of gamers - load testing has proven that the system can reliably manage 200,000 concurrent players. This level of scalability is achieved by distributing the load across multiple machines, allowing players to connect to one of many gateway servers.

ES4 intelligently shuffles users between gateways to minimize the message traffic. Each player can see and interact with other players connected to any gateway!

Page 7: Les2222

ElectroServer 4 FeaturesExtensions Give Developers More Control

Using multiple hooks - Extensions - ElectroServer 4 lets game developers extend a server's functionality. Comprised of a collection of Java or ActionScript files, these server extensions put control in the hands of the developer. Three types of server extensions are available to increase server capabilities with Java or server-side ActionScript: plugins, managed object factories, and event handlers.

Page 8: Les2222

ElectroServer 4 FeaturesDual Server Modes Suit Future Growth

ElectroServer 4 operates in either standalone or distributed mode. ElectroServer 4 Professional runs in standalone mode only, which can be employed for one installation and one start-up process to ensure blazing fast throughput.

ElectroServer 4 Enterprise supports distributed mode, which allows for installation across many machines. Through multiple gateway server installations, ES4 manages player connections seamlessly. This version also supports standalone mode option for maximum application flexibility.

Page 9: Les2222

ElectroServer 4 FeaturesStreaming Audio & Video

ElectroServer 4 is a premier Flash Media Server alternative that gives developers the tools to build and execute scalable, massive multiplayer online games, communities, and social networking sites. ES4 helps developers progress from hosting traditional streaming live-events hosting to efficiently incorporating the use of Webcams and microphones into the application. Leveraging the streaming A/V tool set, developers can transform live-event streaming such as TV shows or concerts to a real-time online experience for thousands of players. ES4's A/V recording capabilities can also capture an event in real-time and store it for future playback.

Page 10: Les2222

ElectroServer 4 FeaturesA Cost-effective Solution for all Development Levels

ElectroServer 4 helps game developers avoid common roadblocks found when creating games on other servers. This accelerates development time and minimizes man hours - giving companies true ROI. ElectroServer's flexible tiered licensing adapts an anticipated number of concurrent users on one or multiple machines, making it a great value proposition for applications on all scales and development levels.

Page 11: Les2222

ES4 Licensing Architecture

Page 12: Les2222

Server ConceptsWe look at ElectroServer concepts and some terminology.

UsersRoomsZonesChatBuddiesEsObjectsExtensions

Page 13: Les2222

UsersA 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.For instance, to stream video from the server to a client

using ElectroServer, a user establishes a second connection to handle the audio/video stream.

Page 14: Les2222

RoomsIn ElectroServer, a room is a way for one to many users to

see each other and interact.If a user is in room, then that user can send a chat

message, which is then broadcast to all users in that room.A user can be in multiple rooms at a time.

Page 15: Les2222

RoomsThere are two types of rooms in ElectroServer:Persistent : A room that always exists, even if there are

no users in it. Persistent rooms are created using the web-based administrator.

Dynamic : A room that is created for a single use. A dynamic room is automatically removed when there are no more users in that room. This is the most common type of room.

Page 16: Les2222

ZonesA zone is a collection of rooms. Every room must exist in

a zone. A room cannot exist in more than one zone.Rooms within a zone must be uniquely named.During the room creation, a zone is specified. If that zone

does not exist, then it is created.A zone is removed when there are no more rooms in that

zone.

Page 17: Les2222

ChatChat is the primary method by which users interact with

each other while connected to a socket server.In ElectroServer, as in many other socket server solutions,

there are public and private chat messages.

Page 18: Les2222

BuddiesSocial 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.

A user can then message any of her buddies that are currently online and even challenge them to a game.

Page 19: Les2222

EsObjectsAn 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.

Page 20: Les2222

ExtensionsThe server is highly extensible using what are called

extensions. An extension is a collection of one or more ActionScript or Java files/classes that are used to add more functionality to the server.

These extensions can be used as server-level event handlers, such as the Login Event Handler, as Managed Objects which come in handy for things like database connection pooling, or as Plugins.

Plugins are run at the server level or at the room level and are frequently used to execute game logic.

Page 21: Les2222

EsObject and PluginOne of the most attractive benefits of an EsObject is that

it allows for data to be sent across languages cleanly and easily.

A plugin written in ActionScript can create an EsObject and send it to a Java client and both sides will treat it consistently. There is no need to perform any messy conversions.

Page 22: Les2222

EsObject and PluginFor example: A Flash client can create an EsObject,

populate it with strings, numbers and arrays of information, and then just send it to a server plugin. The plugin receives this EsObject and can access all of that information.

Page 23: Les2222

Installation

Page 24: Les2222

ElectroServer 4 installationElectroServer is a Java application. This means that any

computer that can run the Java.Windows 98/ME/NT/2000/XP, Solaris, and Linux are

among the supported operating systems.

Page 25: Les2222

ElectroServer 4 installation此畫面是選擇安裝的

ElectroServer 的版本 , 一般而言 Professional 的版本較適合高效能的即時遊戲;而 Enterprise 版本,較適合製作回合制的遊戲或是聊天室使用

請安裝 Professional 的版本

Page 26: Les2222

ElectroServer 4 installation設定伺服器的 IP 或是伺

服器的名稱、 Port 和是否支援 SSL 模式

Page 27: Les2222

ElectroServer 4 installation設定 ES 伺服器的管理者

名稱和密碼預設的 Username 為

administrator預設的 Password 為

password

Page 28: Les2222

ElectroServer 4 installation此畫面是選擇當作業系

統啟動時,是否要將ElectroServer 也啟動,可選可不選。

Page 29: Les2222

Start up ElectroServerElectroServer_4_0_6_Windows.exe

Page 30: Les2222

Administration

Page 31: Les2222

Web Based AdministratorElectroServer comes with a full-featured web-based

administrator. Almost all server configuration and maintenance is done

through this tool. This includes managing extensions, creating server-level plugins, persistent rooms, configuration filters, setting up gateways,managing license files, and much more.

Page 32: Les2222

Web Based AdministratorTo use the web-based administrator ElectroServer must be

running. The admin is served up using ElectroServer’s built-in web

server. The settings for the web server are the only server configuration settings that happen outside of the admin.

The web server settings are configured here: [installation directory]\ server\config\ES4Configuration.xml

Page 33: Les2222

Administration PanelYou must ensure that the ElectroServer’s settings are

configured to your needs.Let us introduce the administration panel, which exists to

allow configuration of ElectroServer’s many options.

Page 34: Les2222

Administration PanelIf all server default settings are used during installation,

then you can access the admin here:

https://localhost:8080/admin/If you left the username and password as the default

during installation then they are: administrator / password.

Page 35: Les2222

The Web Admin Sections( 附件: ElectroServer 4 Manual.pdf --- 3

Administration)We’ll look here at the three that are most commonly used:

Gateways MenuExtensions MenuPersistent Rooms Menu

Page 36: Les2222

Gateways MenuThe Gateways menu provides the configuration for adding

addresses and ports to enable socket communications between ElectroServer and connecting clients.

If you need to edit any of these addresses, click on Edit StandAlone, which will bring up the configuration for these listeners.

Page 37: Les2222

Edit GatewayAfter editing, restart the server.

Page 38: Les2222

Extensions MenuIn the Extensions menu, you can install and configure any

server extensions to be used with ElectroServer.

Page 39: Les2222

Extensions MenuThe front screen of the Extensions menu provides a list of

currently installed extensions as well as the option of installing new ones.

Page 40: Les2222

Setting Up the Sample ExtensionThe ZIP FILE that you downloaded contains an extension

that you can deploy in your ElectroServer installation without needing to be able to compile Java.

In the book_files/examples_extension/extension folder, find and copy the GameBook subfolder. Paste this into your ES4 installation folder/server/extensions. Reboot the ES4, and then add the server-level components.

Page 41: Les2222

Server-Level ComponentsAfter deploying the extension, restart ElectroServer and

open the administration panel.Go to the Extensions tab. Click the plus button (+) for

GameBook, and then click the New Server-Level Component button. The next screen should show the Extension name of GameBook.

Choose TimeStampPlugin from the Plugin Handle drop-down menu, and then type TimeStampPlugin into the Plugin Name field.

Repeat this process with GMSInitializer, and then restart ElectroSerer again.

Page 42: Les2222

Persistent Rooms MenuThis menu provides a means of creating rooms and zones that

will persist while ElectroServer is running.A persistent room is a room that is not removed when the user

list is empty. Most rooms are dynamic and are removed when empty.