Les 1 ppt


Published on

Published in: Education
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Les 1 ppt

  1. 1. 網路遊戲設計<br />Web Game Design<br />授課教師 江素貞<br />
  2. 2. Chapter 1 Introducing Web Game <br />Web Game Landscape<br />
  3. 3. Web game<br />A web game is a game hosted on a website and played through a web browser.<br />With tens of thousands of them on the Internet, one thing is clear: web-based games are tremendously popular.<br />In this chapter, we briefly explore client technology, typical goals of web games, and how this all relates to multiplayer games.<br />
  4. 4. Client-side Technology<br />Web-base games are created using a number of different platforms.<br />The platform provide you with a programming language and a way to compile it into game content publishable to the web.<br />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.<br />
  5. 5. Flash for Client-side<br />Flash is the most-used platform for creating web-based games.<br />Flash bridges the gap between artist and programmer very well.<br />
  6. 6. Typical Goals<br />This section classifies most web games into some general categories that attempt to answer the question, why was this game made?<br />However, you should keep these goals in mind when designing a game, so that your game design supports what you are trying to achieve.<br />
  7. 7. Typical Goals<br />A multiplayer perspective is added that can help support the goal.<br />Generating banner ad revenue<br />Making your site even stickier<br />Marketing<br />Driving Downloads<br />Education<br />Providing subscription value<br />Because I can<br />
  8. 8. Generating Banner Ad Revenue<br />You 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.<br />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.<br />
  9. 9. Making Your Site Even Stickier<br />Sometimes games are created and put non-game websites in an attempt to get visitors to stay longer.<br />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.<br />The goal is to get users to use the game for a while and then browse the site.<br />
  10. 10. Marketing<br />Games are often created to promote things like movies, TV shows, consumer products, and events.<br />Sometimes this approach is mixed with ad banners.<br />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.<br />
  11. 11. Driving downloads<br />The casual game download market is huge and very successful. <br />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.<br />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.<br />
  12. 12. Education<br />Educational games can greatly benefit from multiplayer concepts. There are many possibililies here such as <br />driving the desire to learn more through competition<br />giving learners assistance in real time<br />providing one-on-one creative training approaches<br />
  13. 13. Providing Subscription Value<br />By paying a monthly subscription, users gain access to regular new features and content.<br />Most site like these are virtual worlds.<br />Club Penguin (www.clubpenguin.com)<br />Faraway Friends (www.farawayfriends.com)<br />One of the most attractive parts of a virtual world is the social aspect.<br />
  14. 14. Because I can<br />This is one of the most common motivations for creating games─developers just want to create something.<br />
  15. 15. Chapter 1 Introducing Web Game <br />Connecting Users<br />
  16. 16. Introduction<br />How do users get information about each other?Are they directly connected to each other, or is something else going on?<br />Here will describe the most common way this interaction is handled.<br />
  17. 17. Connection Techniques<br />Typically, clients can interact with each other in one of two primary ways:<br />Peer to peer. Information is transferred between clients without the use of a server.<br />Client-server. A clients sends information only to the server. The server then transfers information to clients.<br />
  18. 18. Peer to peer<br />A server may have been used to allow then to find each other in the first place, but is not used after that.<br />fully connected topology<br />ring toplogy<br />Generally 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.<br />
  19. 19. Peer to Peer<br />In a fully connected peer to peer setup, all clients connect to each other.<br />
  20. 20. Client-Server<br />This category has two primary approaches:<br />polling<br />persistent socket connections<br />A persistent socket connection, through the use of a socket server, is the most common approach.<br />
  21. 21. Client-Server<br />In a client-server setup, clients communicate with the server to exchange information.<br />
  22. 22. Socket Servers<br />A socket server is a program running somewhere, listening for connection attempts.<br />Socket server exist at an IP address or hostname and listen for connections on at least one port.<br />When a client establishes a connection with a socket server, the have opened up a persistent socket connection with the server.<br />Updates in a socket-server application are event-driven and real-time. (Internet latency is still something to be dealt with in some games)<br />
  23. 23. Polling<br />Polling is an approach that rarely makes sense to use.<br />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)<br />
  24. 24. Polling<br />A client is polling the server repeatedly looking for updates, and usually there are none.<br />
  25. 25. Chapter 1 Introducing Web Game <br />Where Decisions are Made<br />
  26. 26. Concepts<br />In 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?<br />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.<br />
  27. 27. Authoritative Client<br />The server is used simply to route messages between the clients.<br />We’ll see one example of when decision-making on the client works and one where it doesn’t.<br />
  28. 28. Authoritative Client<br />An example: consider a two-player, turn-based game of pool. <br />Good choice for a simple game of pool.<br />
  29. 29. Authoritative Client<br />An example: consider a two-player, real-time tank-shooter game.<br />Not such a good choice for a real-time tank-shooter game.<br />
  30. 30. Authoritative Server<br />Tank 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.<br />In an authoritative server, the server is the single decision maker, so there is never any confusion about what is going on.<br />
  31. 31. Authoritative Server<br />The same real-time tank-shooter game, now controlled on the server.<br />
  32. 32. When to Use Which Model<br />A turn-based game where all of the information is know will most likely fit into an authoritative client model.<br /> (There is nothing left up to chance and nothing left to be revealed.)<br />Some games that fit these criteria are chess, checkers, Connect Four, and pool.<br />
  33. 33. When to Use Which Model<br />Most real-time games (games where there are no turns) will automatically need to be authoritative server.<br />Texas HoldemPocker<br />Monopoly<br />Car racing game.<br />
  34. 34. ElectroServerPlugin Concepts<br />Extensions are used to extend the functionality of the server. Three types of extensions:<br />Managed objects.<br />Event handlers<br />Plugins.<br /> 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.<br />A plugin can be conceptualized as a class.<br />
  35. 35. Talking to Plugins<br />Since games take place between users in a room together, the plugins that are most useful for our purposes are room-level plugins.<br />Once the room is created, the client can communicate with the plugin through the API.<br />Custom information is passed from the client to the plugin or from the plugin to the client through the use of EsObjects.<br />