Wiley.Games.on.Symbian.OS.A.Handbook.for.Mobile.Development.Apr.2008 (779888), страница 56
Текст из файла (страница 56)
The technology behindthe N-Gage Arena is discussed in more technical detail in Chapter 5. Inbrief, it provides multiplayer gameplay over a GPRS network includinga backend system that provides hosting, data storage and user accountmanagement. The N-Gage Arena SDK provided APIs for developers touse that presented a standard user interface for handling network logins,lobby and game room creation and matchmaking.
Developers wereable to focus their efforts on game development instead of creating anetworking game library. For example, using the APIs provided by theN-Gage SDK, a game developer could either add the ability for a gameto be played simultaneously by two or more players (for example, aturn-based action game or a shadow racing game). The N-Gage ArenaAPIs also provided the functionality to upload game high scores and thensend messages to challenge friends to beat them, along with a range ofother connected gaming features.The technology behind by the N-Gage Arena was originally partof Sega.com’s SEGA Network Application Package for mobile multiplayer gaming. Nokia acquired Sega.com Inc.
(a subsidiary of SEGA) inearly 2003 to enable them to offer networked multi-play and a virtualcommunity to N-Gage gamers immediately at launch.244THE N-GAGE PLATFORMThe N-Gage SDK was provided free of charge to developers contractedto write N-Gage applications, and was supported by a team dedicated tohelping with technical issues, as well as a number of custom tools anddocumentation. The N-Gage SDK was the first Nokia SDK that providedsupport for on-target debugging, as well as other tools to help the gamedevelopers debug their code and test it prior to game certification – whichis something we’ll discuss next.Although it was, and still is, possible to write games for theN-Gage game decks,3 games are not official N-Gage titles unless they arepublished by Nokia and meet their industry-standard game requirements.The N-Gage standard game requirements (SGRs) were defined based onthe behavior and quality levels expected of a professional-quality gameand, besides play testing, each title was tested against the SGRs.
Thetesting was called certification, and was key to ensuring that all the gamesreleased for Nokia were of a consistent standard.8.1.4 SummaryNokia can be said by some to have been, at best, before their time, and,at worst, to have taken the wrong direction with the N-Gage game deckhardware. However, it is generally agreed that the commercial gamesdelivered for N-Gage by Nokia as a game publisher were of exceptionallyhigh quality, and made creative use of the phone hardware, networkedmulti-play, and phone capabilities available at that time.
The games builtup a loyal fan base, which is supported to this day through the N-Gagewebsite (www.n-gage.com) and the N-Gage Arena community.Having discussed the history, to put it all into context, it is now timeto move on to describe the present day. Instead of producing anothergamer-specific phone, Nokia has decided to concentrate on providingsmartphones that appeal to everyone, and to help developers create anddeliver great games to play on them. Enter the N-Gage platform!8.2 N-Gage Platform: The Next Generation of MobileGamingThe next generation of N-Gage, the N-Gage platform, was first announcedat the E3 Show in Los Angeles back in early summer of 2006, and is duefor release in early 2008.Rather than delivering a single handset, Nokia makes it possible toplay N-Gage games on a range of S60 smartphones, allowing the user3It is still possible to develop games (or other applications) that run on the N-Gageand N-Gage QD game decks.
To do this, you need to use the S60 First Edition FP1 SDKavailable from forum.nokia.com. The N-Gage SDK is not available for public use.N-GAGE PLATFORM: THE NEXT GENERATION OF MOBILE GAMING245to choose between different styles, form factors and prices. This enablesNokia to direct its high-quality N-Gage games to a much larger and morediverse user base.N-Gage compatible smartphones must meet a minimum set of terminalrequirements to give game developers a common set of hardware andfunctionality when creating their games.
All phones are expected tohave a minimum allocatable heap size of 10 MB, a minimum storagecapacity (on an external memory card or built-in memory) of 64 MB,and support for standards such as Bluetooth 1.2 and OMA DRM 2.0.Some phones may be game optimized with dedicated controller keys andlandscape-orientation gaming (where the screen is sideways, with thelongest edge horizontal as is typical for portable game consoles) as wellas portrait-orientation gaming.At the time of writing, Nokia has just announced the first range ofS60 3rd Edition smartphones that will be N-Gage compatible – these areshown in Figure 8.3 and include the Nokia N81, N81 8 GB, N82, N95,N95 8 GB, N93, N93i and N73. More information about the phonescan be found at www.n-gage.com/get ngage/devices.html.
As new S60smartphones are created, they are assessed against the N-Gage terminalrequirements to determine whether they have the minimum capabilitiesneeded to support N-Gage games. It is to be expected that a large numberof Nokia S60 smartphones will eventually be N-Gage compatible, with acorrespondingly-sized audience of potential gamers.Figure 8.3N-Gage compatible S60 smartphones announced in August 20078.2.1 What the N-Gage Platform Offers UsersNokia provides an easy-to-use and reliable service for users to acquirethe games through the N-Gage application.
By allowing an easy way to246THE N-GAGE PLATFORMdiscover, try, buy, play, share and manage mobile games, the N-Gageplatform sets out to be an exceptional mobile gaming experience. Theaim is to remove the woes of the past with regards to finding a gamecompatible with a particular phone, working out how to purchase,download and install it, some of which we described in Chapter 1.Nokia is investing heavily in the supporting technologies and back-endinfrastructure required for this service to function.The overall platform experience will be managed from a client application called the N-Gage application.
This application is guaranteed towork on every phone supported by the N-Gage platform and can bedownloaded from the web if it is not already pre-installed on the phonewhen it is purchased. The N-Gage application is described in more detailin section 8.4.At launch, Nokia is expected to have numerous games available forN-Gage, with a variety of genres and licensed intellectual property,including Pro Series Golf, Snakes Subsonic, Mile High Pinball, HookedOn: Creatures of the Deep and System Rush: Evolution.
More informationabout the games available can be found on the Showroom page of theN-Gage website at www.n-gage.com/showroom.html.8.2.2 What the N-Gage Platform Offers DevelopersThe issues caused by differences between phone handsets (device fragmentation) are constantly being addressed by handset manufacturers, likeNokia, that appreciate the need for a common set of features acrossa range of phones, and use the S60 platform to provide it. However,even with this platform, developers still have to put in effort to createand support a native game across multiple devices – each differing inthe amount of memory available, screen resolution and display size,input capabilities, and other hardware characteristics.
A great deal of thedevelopment budget and time is spent on managing device differences,time that should really go towards tailoring the games for an optimumplaying experience on the mobile form factor.Nokia decided that, to make it easier for professional game developersto reach as many consumers as possible on the S60 platform, the firstrequirement in creating the N-Gage development environment was simple. The developer should be able to create one SKU (stock keeping unit),that is, one deliverable, that runs on all devices.The N-Gage SDK addresses the issue of portability between differentS60 smartphones by providing a set of libraries that presents a consistentinterface for the games to establish hardware capabilities and managethe differences between them.
The SDK provides an abstraction layerbetween an N-Gage game, the services running on the device, and thephone hardware. The game code is insulated from the S60 platform andSymbian OS, and it must use only the APIs provided by the N-Gage SDK.N-GAGE PLATFORM: THE NEXT GENERATION OF MOBILE GAMING247N-Gage GameN-Gage SDKN-Gage PlatformS60 3rd EditionSymbian OS v9.xFigure 8.4The N-Gage SDK abstracts Symbian OS and S60 from game developersAlthough this can be limiting in certain respects, the abstraction layerguarantees compatibility across different devices, taking the responsibilityaway from the game developer.As Figure 8.4 illustrates, the N-Gage SDK provides a single point ofcontact for the game in terms of how its code is exposed on a device.
Asthe number of devices supported by the N-Gage platform grows, oldergames will automatically be supported by these newer devices withoutthe developers being forced to handle any expensive code maintenanceand conversion.A good example of how the N-Gage SDK works as an abstraction layerin practice can be illustrated by considering the issues required to supportgame playing in landscape orientation on different phones. For example,some phones support portrait orientation only, others support both portraitand landscape; some have two variations of landscape-orientation, while,finally, some allow the user to twist the device into a certain orientation.Moreover, on some devices, certain orientations cover the keypad andprevent numeric input. Handling different orientations using the nativeSymbian OS APIs was discussed briefly in Chapter 3.The set of S60 phones that are N-Gage compatible will grow to addmore phones and, of those, a large number of additional phones will cometo market after a game is shipped.
How is the developer to implementthe game code? It would require a logic flow that takes into considerationthe behavior of each N-Gage phone (current and future) so that the gamecan adjust the graphics for the screen mode and input keys accordingly.As you expand the number of devices the decision tree for handling allthis logic becomes untenable in a single SKU.When using the N-Gage SDK, a developer does not have to manageall this logic, since it is handled for them at a platform level. TheSDK provides the developer with a handful of methods to detect whatorientations a phone supports, what the current orientation is, and howto set a new orientation.