Wiley.Games.on.Symbian.OS.A.Handbook.for.Mobile.Development.Apr.2008 (779888), страница 38
Текст из файла (страница 38)
But, in fact, onlinemultiplayer games are very different propositions to short link connectedBluetooth games for another reason. The big difference between themis that online games will almost always involve connection to a remoteserver. The server is needed to allow each device to know which otherdevices playing the same game are on the network. This is because network operators often use Network Address Translation (NAT) to preventdevices from communicating directly, even if game players do knowabout each other and arrange to play a game together over the network.For the purposes of the rest of this section, we always assume the presence of a remote server when we discuss online multiplayer games.
Thosegames using an IP network (such as an ad hoc WiFi network) withouta server may be simply considered a variant of short link multiplayergames, and are not discussed here.5.3.1 Issues and Features Associated with Server-BasedOnline GamesSome of the issues that affect all online multiplayer games are that:• the network operator must have a suitable data network• the device must be set up correctly to use it• the users understand that they may be billed for the use of data.3Nowadays most phones will be configured with the correct settingsfor the operator, but some operators may have separate ‘web’ and ‘data’network settings. The web settings will be billed at a lower rate but willbe restricted to a ‘walled garden’ of content that probably doesn’t includeexternal game servers.
A game developer will have problems informing3If players are not on flat-rate (‘all you can eat’) data plans, they expect to be told whenan application is doing things that will cost them money. But, on the other hand, the samegame will be deployed through various operators to people with varying price plans, andsome of those people will be on flat-rate plans. Those players don’t want to be hassled withtoo many confirmation dialogues, or confused by being told that the game may cause themto see extra data charges, when it actually will not.162MULTIPLAYER GAMESthe user which settings they are supposed to use, since this is different forevery operator.However, once the remote server is in place, and the user can connectto it, numerous other use cases such as asset downloads, non-real-timegameplay, server-based game code, and community features becomepossible.
These are arguably more useful and exciting than just playingagainst other people for the duration of the game session. Let’s considerthese in a little more detail.Global real-time multiplayer gameplayThis is the most obvious application: you can play in real time againstopponents anywhere in the world, just as you can with online consoleand PC games. The theory is simple; you have a lobby running on theserver which connects you with opponents, then once the game has beenset up, everything is roughly the same as with short link gaming, onlyover the Internet.However, it’s been used extensively in only a very few commercialmobile games on Symbian OS so far.
There are a number of complications,some of which are as follows:• Latency is high. Mobile latencies are higher than over the wiredInternet or over Bluetooth, which has very low-latency, as we discussed earlier. Over the phone networks, latencies can also be ratherunpredictable. Game design needs to consider this, and some genresof game will be a real challenge. Racing games can be playablewith very high latencies, but other genres, such as shoot ‘em upsor multiplayer platform games, are more problematic.
Exact latenciesvary depending on the wireless technology being used; GPRS networklatencies are claimed to be in the region of 1 second but they areoften higher in practice. HSDPA is expected to have latencies in theregion of 100 ms, which will make far more game genres possible.• There are various perceived and actual problems with reliability,because mobile wireless communications are inherently susceptibleto all sorts of complications.
Assuming you’ve designed a game for anHSDPA handset that you know will only be deployed on a networkthat’s rolling out HSDPA, can your game cope when someone roamsmid-game onto a GPRS network? Even worse, the device might dropout of coverage altogether.• Flat-rate data tariffs are becoming more common but are still rare inmany areas. The cost of playing online games may be high, and it isalso hard to explain to the user, since the game has no way of knowingwhat price plan the user is on. Game publishers are understandablyvery wary of giving users nasty surprises in their phone bills. EvenONLINE MULTIPLAYER GAMES163network operators would prefer to avoid users running up high billsunexpectedly, since they have to pay for customer support personnelto handle the angry phone calls received in complaint!Non-real-time multiplayer gameplayThere are other modes of multiplayer gameplay that don’t involve realtime interactions.
The most simple is a high score service – a playeruploads their scores on a regular basis, and can see how they fit inrelation to the overall population of gamers for that title.At a greater level of complexity, game modes can be created thatinvolve interacting with another player, but not at the same time. Manyof Ideaworks3D’s games for the original Nokia N-Gage game deckinvolved ‘shadow racing’ online modes. Players attempted to completean objective in a shorter time than an opponent, by playing against theghostly image of the other player’s attempt at the same challenge, whichthey had previously downloaded using their GPRS connection.Another option is to design turn-based games, either where opponentsplay a turn immediately after each other or with turns happening at fixedtimes, such as one turn per day, for example, in a prolonged game ofchess or hangman.Incremental asset downloadsSo real-time gameplay is possible, but has many complications that oftenscare the game publishers and network operators.
What can usefullybe done online instead? One feature that is simple but very useful isincremental asset downloading. The current generation of smartphoneshave graphics capabilities that easily surpass the quality of the originalSony PlayStation, but over the air download speeds and shortage ofstorage space on the phones means that mobile games usually have tofit in a footprint of 1 or 2 megabytes, which is far less than the 650 MBthat PlayStation game developers had to play with. An obvious way ofwinning some extra storage space (though still a lot less than 650 MB) isto store only some of the game on the handset at one time, for instanceby incrementally downloading only a single level at a time.A well-designed asset download system must be able to cope with thesometimes temperamental nature of mobile wireless communications.Requirements include being able to resume interrupted downloads andto keep control of the amount of storage space the game occupies.Server-side game logicThe obvious ‘next step’ after level downloads is to start putting game logicon the server.
For example, Ideaworks3D has developed a mobile version164MULTIPLAYER GAMESof a racing game where buying and customizing new cars are importantaspects of game progression. For a mobile game, the title has an extensiverange of cars and options because the entire car shop is implemented onthe server. The server keeps track of where the player is in the game, andhence which items are available to buy, how much money the playerhas, and what items have been bought. Based on this information, it thenassembles the player’s car for the game to download. It also suppliesa range of equivalent cars for players to race against to keep the gameinteresting. Compared to asset downloads, this is not dumb delivery ofdata – the server decides on the data the game should download basedon knowing the player’s progression through the game.Another Ideaworks3D mobile game runs most of the rendering codefrom the desktop version of the game on the server, allowing the playerto create highly customizable characters that can then be downloadedand used.