Wiley.Games.on.Symbian.OS.A.Handbook.for.Mobile.Development.Apr.2008 (779888), страница 66
Текст из файла (страница 66)
This is content-moderated and accessible from PCsonly• news and events – used to inform the community about new activitiesand upcoming attractions.However you read it, the take-home message here is that the SNAPMobile framework is designed to create and encourage a vibrant onlinecommunity for multiplayer game playing. Nokia is working closely withnetwork operators to ensure SNAP is supported by them, which makes alot of sense, since it generates revenue through use of network bandwidth.The SNAP SDK includes the mobile client API as a JAR file (smapi.jar) as well as the framework emulator.
You also get an API compatibility test MIDlet from Forum Nokia (www.forum.nokia.com/main/market segments/games/api compatibility test.html ) that you can useto help you to adhere to certain guidelines in order to get your gameAND ANOTHER THING . . .293SNAP certified which is a pre-requisite of using the SNAP frameworkservers. These involve mandatory requirements as well as best practices.Every game has a globally unique class ID (GCID) which is centrallyassigned by the SNAP Mobile team and must be hard-coded in yourgame source (you can’t read it in from a JAD file as an attribute). It isused both to identify the game and as one of the arguments passed tothe server during the login process.
The API consists of the two packagescom.nokia.sm.net, which contains classes used to communicate witha SNAP Mobile game server, and com.nokia.sm.util, which containsutility classes.Server communications are done using an instance of the ServerCommclass, and MIDlets register themselves with this communications channelby implementing the SnapEventListener interface and calling theaddSnapEventListener method. This interface defines two methodswhich are used as asynchronous callbacks by the SNAP servers to notifythe client of events.public interface SnapEventListener{void processEvents(Vector list);void processServerError(int code, String message,int severity);}The methods of the ServerComms class are all pretty self-explanatory – examples include the acceptBuddyRequest, joinGameRoom,sendGamePacket and reportScores methods, which obviously dowhat they say.
Most methods return an ItemList which is a container forobjects that can be retrieved by name as well as a number of conveniencemethods for getting typed named data. The interface described aboveactually receives a Vector of ItemList instances, each of which hasan integer identifier describing the type of event.We’ve seen that the SNAP Mobile initiative provides a wide rangeof facilities to help developers create multiplayer online mobile gamesusing Java ME very quickly and easily. It is expected that by 2010, over30 % of mobile games will be connected games, so this is a great way fordevelopers and operators to generate heaps of revenue.
There’s a lot moreinformation about SNAP that we don’t have space to cover, so for moreinformation about the statistics quoted, complete code walkthroughs ofdeveloping SNAP games using Java ME, white papers, and certificationguides, go to www.forum.nokia.com/snapmobile.9.11 And Another Thing . . .This chapter has talked (at length) about MIDP game development onSymbian OS. In particular, we talked about focused game design for the294MIDP GAMES ON SYMBIAN OSMIDlet life cycle, and game pausing as core concepts.
We also covereda lot of technicalities relating to why you should use Java ME for gamedevelopment as well as heaps about the science of writing a MIDP 2.0game using the example game Third Degree. And we saw how Nokia’sSNAP framework reduces time-to-market for online multiplayer mobilegames and allows game developers to focus on what they’re best at (allthe fun bits).However it’s important to remember that most of the techniquescovered here equally apply to Java ME game development as a whole notjust on Symbian OS.
Java ME has been the work horse of mobile gamedevelopment for almost a decade and has a long history of successesin the market (yes – and some titles that imploded too), and there’s noreason to think that this is going to change anytime soon.Unless some other technology rises out of nowhere and suddenlybecomes more ubiquitous than Java ME in the mobile space, there’s justno competition – not with a billion Java enabled handsets out there. Sothere’s no reason not to get into it now.Hopefully this chapter has convinced you of the benefits of gamedevelopment using Java ME (it has certainly convinced me anyway). Isaid earlier that it’s the best cross-platform development technology inthe universe.
This may be an exaggeration, but until we make extra-solarcontact, and they’ve done it better than us, I’ll stand by that.Symbian OS provides a world-leading best-of-breed CLDC/MIDP combination that enables experts and novices alike to dive head first into theexciting world of creating mobile games.So what are you waiting for?9.12Further ReadingIf you’re looking for some further reading on Java ME development, hereis a list of suggested reading:General Game Development• Core Techniques and Algorithms in Game Programming, SanchezCrespo Dalmau, New Riders, 2003• Physics for Game Developers, Bourg, O’Reilly, 2002• AI for Game Developers, Bourg and Seemann, O’Reilly, 2004Mobile Game Development• OpenGL ES Game Development, Astle and Durnil, Premier Press,2004• Developing Scalable Series 40 Applications, Yuan and Sharp, NokiaPress, 2005FURTHER READING295Java/Java ME Development• Programming Java 2 Micro Edition on Symbian OS, de Jode, SymbianPress, 2004• Java 2 Micro Edition Application Development, Kroll and Haustein,SAMS, 2002• Programming Wireless Devices with the Java 2 Platform Micro Edition,2nd Edition, Riggs, Taivalsaari et al., Addison Wesley, 2003• The Java Programming Language, Fourth Edition, Arnold, Gosling andHolmes, 200610Games In JapanSam Mason(Mobile Intelligence)10.1 IntroductionIn this chapter, we examine mobile game development for the Japanesemarket.
This market is unique in the Symbian ecosystem and presentsnew technical and social challenges for game development. We startwith an outline of the reasons why this market is different, then explorethe Java technology that can be used in developing games to run onphones in Japan, which is called DoJa. Moving on, we will discuss issuesto be considered when porting a MIDP 2.0 game across to DoJa 2.5oewith some thoughts on the Third Degree game from Chapter 9, and weclose with some remarks on using the Mascot plug-in for 3D graphicsdevelopment in DoJa games.10.2 The Japanese MarketWe’re all used to the large differential between Japan and the rest of theworld when it comes to electronics and technology, so it should comeas no surprise that the mobile phone market in Japan challenges mostWestern perceptions of device utility.
As a consequence, if you’re goingto try and break into the Japanese game market, it’s a good idea to havean idea of the playing field before kick-off.There are almost 130 million people in Japan of whom 75 % aremobile phone subscribers of some kind. Over half of these (so more than50 million people) are subscribed to services provided by the telecommunications giant NTT DoCoMo1 (the ‘DoCoMo’ comes from the phrase‘Do Communication over Mobiles’).1You can find out more about NTT DoCoMo at www.nttdocomo.com.298GAMES IN JAPANThink about this – as you’re reading this paragraph, millions of peoplein Japan are using their mobile phones to scan product bar codes andRFID tags, to pay for public transport, to exchange reviews on placesto eat, to make reservations, to access their bank details, or to purchasegoods while out shopping.The youth demographic is heavily game-oriented and more than comfortable with cutting edge technologies.
In addition, market penetration,consumer expectations and technology adoption rates are far aboveanything the rest of the world is used to. The pace of the market isphenomenal – the turnaround on software and hardware releases alone(more on this later) creates a unique platform for game development.To celebrate the sale of the 20 millionth Symbian handset in Japan,the folks at Symbian put together a light hearted look at their uses ofmobile phone technology (check out the ‘Boo Hoo For You!’ video atwww.youtube.com/watch?v=1xQVnny0LSg ). While this video is tonguein-cheek, it’s clear that to get into this market, your products must appealto a very different group of consumers.
So Japan is way ahead of us andalready doing many of the things that we’re still getting impressed about.I’m writing about it, and you’re reading about it, but they’ve alreadydone it.To push the metaphor further, the referee in this game is NTT DoCoMo.They produce their own handsets and development platforms. Theyalso released the world’s first 3G network service, Freedom of MobileMultimedia Access (FOMA), in 2001.