網路遊戲設計Web Game Design授課教師 江素貞
Chapter 1 Introducing Web Game Web Game Landscape
Web gameA web game is a game hosted on a website and played through a web browser.With tens of thousands of them on the Internet, one thing is clear: web-based games are tremendously popular.In this chapter, we briefly explore client technology, typical goals of web games, and how this all relates to multiplayer games.
Client-side TechnologyWeb-base games are created using a number of different platforms.The platform provide you with a programming language and a way to compile it into game content publishable to the web.Avirtual machine is software that your web browser uses to know how to run compiled content. Adobe’s Flash virtual machine is just called Flash Player.
Flash for Client-sideFlash is the most-used platform for creating web-based games.Flash bridges the gap between artist and programmer very well.
Typical GoalsThis section classifies most web games into some general categories that attempt to answer the question, why was this game made?However, you should keep these goals in mind when designing a game, so that your game design supports what you are trying to achieve.
Typical GoalsA multiplayer perspective is added that can help support the goal.Generating banner ad revenueMaking your site even stickierMarketingDriving DownloadsEducationProviding subscription valueBecause I can
Generating Banner Ad RevenueYou try to attract as many people to your site as possible, and keep them on it as long as possible, to generate a large number of ad impressions.If keep users around longer is the goal, then giving users the ability to chat adds a new layer to tour site that will give users another reason to stick around.
Making Your Site Even StickierSometimes games are created and put non-game websites in an attempt to get visitors to stay longer.If a user stays on tour web-site to play a game, then maybe that user will exercise other aspects of the website when not playing the game.The goal is to get users to use the game for a while and then browse the site.
MarketingGames are often created to promote things like movies, TV shows, consumer products, and events.Sometimes this approach is mixed with ad banners.Mattel’s Rebellion Race game (www.hotwheels.com/games/rebellion/index.aspx), which allows the real-time multiplayer car-racing game to promote the company’s toy cars.
Driving downloadsThe casual game download market is huge and very successful. Site like Real Arcade (www.realarcade.com) and Big Fish Games (www.bigfishgames.com) promote many of their downloadable games with free lightweight web games.The web game is a sample of what you would download. You get hooked with the web game, and then download and pay for the full game.
EducationEducational games can greatly benefit from multiplayer concepts. There are many possibililies here such as driving the desire to learn more through competitiongiving learners assistance in real timeproviding one-on-one creative training approaches
Providing Subscription ValueBy paying a monthly subscription, users gain access to regular new features and content.Most site like these are virtual worlds.Club Penguin (www.clubpenguin.com)Faraway Friends (www.farawayfriends.com)One of the most attractive parts of a virtual world is the social aspect.
Because I canThis is one of the most common motivations for creating games─developers just want to create something.
Chapter 1 Introducing Web Game Connecting Users
IntroductionHow do users get information about each other?Are they directly connected to each other, or is something else going on?Here will describe the most common way this interaction is handled.
Connection TechniquesTypically, clients can interact with each other in one of two primary ways:Peer to peer. Information is transferred between clients without the use of a server.Client-server. A clients sends information only to the server. The server then transfers information to clients.
Peer to peerA server may have been used to allow then to find each other in the first place, but is not used after that.fully connected topologyring toplogyGenerally speaking, peer to peer is not used much in gaming. However, peer to peer is alive and well for file-sharing networks, and is also being used successfully to distribute patches for games like World of Warcraft.
Peer to PeerIn a fully connected peer to peer setup, all clients connect to each other.
Client-ServerThis category has two primary approaches:pollingpersistent socket connectionsA persistent socket connection, through the use of a socket server, is the most common approach.
Client-ServerIn a client-server setup, clients communicate with the server to exchange information.
Socket ServersA socket server is a program running somewhere, listening for connection attempts.Socket server exist at an IP address or hostname and listen for connections on at least one port.When a client establishes a connection with a socket server, the have opened up a persistent socket connection with the server.Updates in a socket-server application are event-driven and real-time. (Internet latency is still something to be dealt with in some games)
PollingPolling is an approach that rarely makes sense to use.Polling is the act of a client making a request to the server on a timed interval to  check for updates. (A client is never connected to the server)
PollingA client is polling the server repeatedly looking for updates, and usually there are none.
Chapter 1 Introducing Web Game Where Decisions are Made
ConceptsIn multiplayer games, logic can be found on both the client and on the server. But if game logic can exist in both places, which has the authority to make important decisions? And why?Games that have most important decisions being made on the client are called authoritative client, and those that have most important decisions being made on the server are called authoritative server.
Authoritative ClientThe server is used simply to route messages between the clients.We’ll see one example of when decision-making on the client works and one where it doesn’t.
Authoritative ClientAn example: consider a two-player, turn-based game of pool. Good choice for a simple game of pool.
Authoritative ClientAn example: consider a two-player, real-time tank-shooter game.Not such a good choice for a real-time tank-shooter game.
Authoritative ServerTank game is an example of an authoritative client that leads to a disagreement between the clients. The solution to this problem is to move that important decision-making to the server.In an authoritative server, the server is the single decision maker, so there is never any confusion about what is going on.
Authoritative ServerThe same real-time tank-shooter game, now controlled on the server.
When to Use Which ModelA turn-based game where all of the information is know will most likely fit into an authoritative client model.	(There is nothing left up to chance and nothing left to be revealed.)Some games that fit these criteria are chess, checkers, Connect Four, and pool.
When to Use Which ModelMost real-time games (games where there are no turns) will automatically need to be authoritative server.Texas HoldemPockerMonopolyCar racing game.
ElectroServerPlugin ConceptsExtensions are used to extend the functionality of the server. Three types of extensions:Managed objects.Event handlersPlugins. A plugin is custom code run on the server. If your are going to write an authoritative server game, you need to write a plugin.A plugin can be conceptualized as a class.
Talking to PluginsSince games take place between users in a room together, the plugins that are most useful for our purposes are room-level plugins.Once the room is created, the client can communicate with the plugin through the API.Custom information is passed from the client to the plugin or from the plugin to the client through the use of EsObjects.

Les 1 ppt

  • 1.
  • 2.
    Chapter 1 IntroducingWeb Game Web Game Landscape
  • 3.
    Web gameA webgame is a game hosted on a website and played through a web browser.With tens of thousands of them on the Internet, one thing is clear: web-based games are tremendously popular.In this chapter, we briefly explore client technology, typical goals of web games, and how this all relates to multiplayer games.
  • 4.
    Client-side TechnologyWeb-base gamesare created using a number of different platforms.The platform provide you with a programming language and a way to compile it into game content publishable to the web.Avirtual machine is software that your web browser uses to know how to run compiled content. Adobe’s Flash virtual machine is just called Flash Player.
  • 5.
    Flash for Client-sideFlashis the most-used platform for creating web-based games.Flash bridges the gap between artist and programmer very well.
  • 6.
    Typical GoalsThis sectionclassifies most web games into some general categories that attempt to answer the question, why was this game made?However, you should keep these goals in mind when designing a game, so that your game design supports what you are trying to achieve.
  • 7.
    Typical GoalsA multiplayerperspective is added that can help support the goal.Generating banner ad revenueMaking your site even stickierMarketingDriving DownloadsEducationProviding subscription valueBecause I can
  • 8.
    Generating Banner AdRevenueYou try to attract as many people to your site as possible, and keep them on it as long as possible, to generate a large number of ad impressions.If keep users around longer is the goal, then giving users the ability to chat adds a new layer to tour site that will give users another reason to stick around.
  • 9.
    Making Your SiteEven StickierSometimes games are created and put non-game websites in an attempt to get visitors to stay longer.If a user stays on tour web-site to play a game, then maybe that user will exercise other aspects of the website when not playing the game.The goal is to get users to use the game for a while and then browse the site.
  • 10.
    MarketingGames are oftencreated to promote things like movies, TV shows, consumer products, and events.Sometimes this approach is mixed with ad banners.Mattel’s Rebellion Race game (www.hotwheels.com/games/rebellion/index.aspx), which allows the real-time multiplayer car-racing game to promote the company’s toy cars.
  • 11.
    Driving downloadsThe casualgame download market is huge and very successful. Site like Real Arcade (www.realarcade.com) and Big Fish Games (www.bigfishgames.com) promote many of their downloadable games with free lightweight web games.The web game is a sample of what you would download. You get hooked with the web game, and then download and pay for the full game.
  • 12.
    EducationEducational games cangreatly benefit from multiplayer concepts. There are many possibililies here such as driving the desire to learn more through competitiongiving learners assistance in real timeproviding one-on-one creative training approaches
  • 13.
    Providing Subscription ValueBypaying a monthly subscription, users gain access to regular new features and content.Most site like these are virtual worlds.Club Penguin (www.clubpenguin.com)Faraway Friends (www.farawayfriends.com)One of the most attractive parts of a virtual world is the social aspect.
  • 14.
    Because I canThisis one of the most common motivations for creating games─developers just want to create something.
  • 15.
    Chapter 1 IntroducingWeb Game Connecting Users
  • 16.
    IntroductionHow do usersget information about each other?Are they directly connected to each other, or is something else going on?Here will describe the most common way this interaction is handled.
  • 17.
    Connection TechniquesTypically, clientscan interact with each other in one of two primary ways:Peer to peer. Information is transferred between clients without the use of a server.Client-server. A clients sends information only to the server. The server then transfers information to clients.
  • 18.
    Peer to peerAserver may have been used to allow then to find each other in the first place, but is not used after that.fully connected topologyring toplogyGenerally speaking, peer to peer is not used much in gaming. However, peer to peer is alive and well for file-sharing networks, and is also being used successfully to distribute patches for games like World of Warcraft.
  • 19.
    Peer to PeerIna fully connected peer to peer setup, all clients connect to each other.
  • 20.
    Client-ServerThis category hastwo primary approaches:pollingpersistent socket connectionsA persistent socket connection, through the use of a socket server, is the most common approach.
  • 21.
    Client-ServerIn a client-serversetup, clients communicate with the server to exchange information.
  • 22.
    Socket ServersA socketserver is a program running somewhere, listening for connection attempts.Socket server exist at an IP address or hostname and listen for connections on at least one port.When a client establishes a connection with a socket server, the have opened up a persistent socket connection with the server.Updates in a socket-server application are event-driven and real-time. (Internet latency is still something to be dealt with in some games)
  • 23.
    PollingPolling is anapproach that rarely makes sense to use.Polling is the act of a client making a request to the server on a timed interval to check for updates. (A client is never connected to the server)
  • 24.
    PollingA client ispolling the server repeatedly looking for updates, and usually there are none.
  • 25.
    Chapter 1 IntroducingWeb Game Where Decisions are Made
  • 26.
    ConceptsIn multiplayer games,logic can be found on both the client and on the server. But if game logic can exist in both places, which has the authority to make important decisions? And why?Games that have most important decisions being made on the client are called authoritative client, and those that have most important decisions being made on the server are called authoritative server.
  • 27.
    Authoritative ClientThe serveris used simply to route messages between the clients.We’ll see one example of when decision-making on the client works and one where it doesn’t.
  • 28.
    Authoritative ClientAn example:consider a two-player, turn-based game of pool. Good choice for a simple game of pool.
  • 29.
    Authoritative ClientAn example:consider a two-player, real-time tank-shooter game.Not such a good choice for a real-time tank-shooter game.
  • 30.
    Authoritative ServerTank gameis an example of an authoritative client that leads to a disagreement between the clients. The solution to this problem is to move that important decision-making to the server.In an authoritative server, the server is the single decision maker, so there is never any confusion about what is going on.
  • 31.
    Authoritative ServerThe samereal-time tank-shooter game, now controlled on the server.
  • 32.
    When to UseWhich ModelA turn-based game where all of the information is know will most likely fit into an authoritative client model. (There is nothing left up to chance and nothing left to be revealed.)Some games that fit these criteria are chess, checkers, Connect Four, and pool.
  • 33.
    When to UseWhich ModelMost real-time games (games where there are no turns) will automatically need to be authoritative server.Texas HoldemPockerMonopolyCar racing game.
  • 34.
    ElectroServerPlugin ConceptsExtensions areused to extend the functionality of the server. Three types of extensions:Managed objects.Event handlersPlugins. A plugin is custom code run on the server. If your are going to write an authoritative server game, you need to write a plugin.A plugin can be conceptualized as a class.
  • 35.
    Talking to PluginsSincegames take place between users in a room together, the plugins that are most useful for our purposes are room-level plugins.Once the room is created, the client can communicate with the plugin through the API.Custom information is passed from the client to the plugin or from the plugin to the client through the use of EsObjects.