Главная » Просмотр файлов » Wiley.Games.on.Symbian.OS.A.Handbook.for.Mobile.Development.Apr.2008

Wiley.Games.on.Symbian.OS.A.Handbook.for.Mobile.Development.Apr.2008 (779888), страница 70

Файл №779888 Wiley.Games.on.Symbian.OS.A.Handbook.for.Mobile.Development.Apr.2008 (Symbian Books) 70 страницаWiley.Games.on.Symbian.OS.A.Handbook.for.Mobile.Development.Apr.2008 (779888) страница 702018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 70)

In this case, you’d be left with no option other than simplifying the game world itself – reducing animations, including fewerobjects in the world, simplifying the physics, etc. This should convinceyou that porting from MIDP to DoJa can often be more of an art thana science.10.6 DoJa and EclipseI’ve talked a lot about how developers to date have worked around deviceconstraints in DoJa games by placing resources on servers and pullingthem down as required. Also, while the DoJa javaappliTool does the jobof a basic development environment, it’s hardly an IDE and wouldn’tcut it in a commercial project – so let’s address these two things and useEclipse to access a server based resource for the Irritant demo we builtearlier.

In what follows, I’ve used Eclipse 3.2 with the DoJa plug-in andTomcat as a local web server.Start up Eclipse and choose File->New Project. With the plug-ininstalled, you should see the ‘DoJa-2.5 Project’ option under the Javanode (see Figure 10.7). Choose this, and complete the wizard by clickingNext and entering your workspace location and project name (Irritant3in this case).Before we go any further, we need to ensure 1.1 class file compatibilityso right-click the project node and go to Properties.

Choose the JavaCompiler node and check the ‘Enable project specific settings’ option.Uncheck ‘Use default compliance setting’ and set the ‘Generated classfiles compatibility’ to 1.1. This will also require you to set the sourcecompatibility to 1.3 (see Figure 10.8).314GAMES IN JAPANFigure 10.7 Creating a new DoJa project in EclipseFigure 10.8 Setting class file compatibilityDOJA AND ECLIPSE315We’re going to change Irritant to get the image file of the Symbianlogo from our local web server. In this case, I simply placed a copy ofthe logo at the root of the default app on Tomcat, so the URL will belocalhost:8080/symbian.gif.Let’s declare our intention to use network connections in the ADF bychoosing Project->DoJa-2.5 Setup and entering the value ‘http’ in theUseNetwork field, as shown in Figure 10.9.Figure 10.9Setting network access in the ADFNext, we change our network settings to define the source URL for theapplication (as represented by the ADF), by choosing Window->Preferences->DoJa-2.5 Environment, and enter the URL of your server in theADF URL field as shown in Figure 10.10.Okay, now comes the hard bit.

Change the line that initializes theMediaImage from:MediaImage mi = MediaManager.getImage("resource:///symbian.gif");to:MediaImage mi =MediaManager.getImage(IApplication.getCurrentApp().getSourceURL()+ "/symbian.gif");And that’s it. Make sure your web server is running and that the logois accessible at the location you’ve specified, and run the demo. Youshould see the application run as before, but remember that, this time,316GAMES IN JAPANFigure 10.10 Setting the source location of the applicationthe resource was loaded from the network instead of from the JAR file(which of course reduced the size).The above process uses a convenience method that wraps an underlying HTTP connection, but you can do this yourself utilizing thecom.nttdocomo.io.HttpConnection class.

If you do, then you’renot limited to image files, but can pull down any type of data you wish(map or level data, 3D meshes, models, sound, etc). This is a powerful technique that allows DoJa to work around many of its resourcelimitations.10.7MascotThe Mascot plug-in allows you to include high-performance 3D graphicsin your DoJa games. It is supplied as a DLL which you download fromwww.mascotcapsule.com/toolkit/docomo/en/index.html under the ‘Library’ section (it’s hard to see).

Unzip it and place the DLL in the binsub-directory of your DoJa toolkit and, woo-hoo, you’re a 3D DoJadeveloper!Three years before the Khronos group got together to think aboutmobile 3D graphics, HI Corporation released Mascot Capsule EngineMicro 3D Edition as the first commercially deployed embedded 3Drendering engine solution.4 By 2003, more than 30 million handsetsworldwide had a version of the Mascot engine in their firmware.4www.mascotcapsule.com/en/MASCOT317Mascot is basically a set of native functionalities written in C with Javawrappers so that they can be used with Java games. In 2004, OpenGL ESwas defined, so V4 of the Mascot engine includes both the V3 API andan implementation of the Mobile 3D Graphics API for J2ME (JSR 184).This uses OpenGL ES where hardware support is available, otherwise, ituses a pure software rendering implementation. It can run on almost anyplatform (Symbian OS, Java ME, BREW, Linux, Palm OS and WindowsMobile) and isn’t dependent on any particular architecture, although V4requires at least ARM-9 class handsets.The DLL provides concrete implementations for the optional DoJa2.5oe package com.nttdocomo.opt.ui.j3d, the contents of whichare shown in Table 10.5 below.Table 10.5 Core 3D graphics classes for DoJa 2.5oeClassDescriptionFigureRepresents a 3D data set for a model.

Can be initializedfrom a file in MBAC format. Includes support for posturechanges with bone animation and supports texturing.ActionTableStores a series of posture changes for a figure.TextureTexture class that can also be used for environmentmapping (called ambient mapping in Mascot terminology).Only supports uncompressed 8-bit BMP images. The classalso supports both normal shading and toon shadingmodels (toon shading is a technique that makes CG lookhand drawn).Vector3DRepresents vectors in 3D space with fixed pointcomponents (where 1.0 maps to 4096). Vector methodsinclude cross product, normalize and dot product.PrimitiveArrayUsed for colour, vertex, point sprite, texture coordinate,and normal arrays.AffineTransformA 4 × 3 transformation matrix used for perspective androtation (no translation or scaling).

This is used to set theposition of the camera in a scene via the Graphics3Dcontext as well as manipulate world objects. All elementsare fixed point numbers.MathContains optimized fixed point implementations of the sin,cos, atan2 and sqrt function all commonly used in 3Dcalculations.Graphics3DThis is the interface defining the graphics contextfunctionality. It defines methods for lighting, shading,scaling and sphere mapping.318GAMES IN JAPANWhole libraries have been written on 3D graphics and it’s outside thescope of this chapter to take this any further so we’ll have to leave it there(although I’d love to talk about it some more).

But 3D graphics work onmobiles is probably the most exciting (and growing) area in IT today, sohave a look at the tutorials on the DoJa Developer Network and the HIMascot site if you want to investigate this further.10.8Tokyo TitlesWe were lucky enough to have Sam Cartwright, who’s one of ourreviewers, make it to the 2007 Tokyo Games Show just as we wereputting this chapter together, and he’s agreed to give us a bit of a tasteof what we can expect in the Japanese market over the next 18 months.Here’s what he had to say:‘‘At the 2007 Tokyo Game Show, NTT DoCoMo’s booth featured a ‘MegaGames Stage’ that showed of some truly amazing DoJa 5.0 ‘mega games’running on their latest 904i series handsets.Many publishers were featuring games that immerse the player in full3D environments created using the OpenGL-ES graphics library, a featurenew to DoJa 5.0.

Also on display were complete games or technologydemonstrations featuring innovative uses for 3D sound, or the accelerationsensor and gesture reader that also make their debut in version 5.0.Without a doubt, the application that stole the show for me was Namco’snew version of Ridge Racers Mobile. Full 3D graphics in WQVGA at400 × 240 pixel resolution result in a stunningly beautiful game. At firstglance you’d be forgiven if you could not tell the difference between themobile and PSP versions.Another favorite was Hudson’s mobile version of their Wii game Kororinpa (released as Marble Mania overseas).

As with the Wii version, youmust twist and turn your mobile handset to maneuver your marbles aroundvarious obstacles in the 3D game world. This is achieved using the AccelerationEventListener that allows the programmer to track the accelerationof the handset along the x, y and z axes, along with pitch, roll and screenorientation.Sega incorporated the gesture reader into their official Beijing 2008Mobile Phone Game. The gesture reader uses the phone’s camera to trackthe player’s movement (or gestures). In the 100 meter sprinting event, youmust run on the spot in front of the phone’s camera in order to move yourgame character along the track. The faster you run, the faster your gamecharacter runs.While the technical possibilities of the new DoCoMo line up is certainlyimpressive, many exhibitors still chose to focus on creating playable andenjoyable (read simple) games. While companies like Gameloft certainlyhaven’t pushed the limit of the technology, they have delivered a line upof enjoyable games that can be played in short sessions without becomingfrustrated at in-depth story lines or unusable controls.

Gameloft’s seriesAT THE END OF THE DAY319of best-selling ‘sexy’ games reminds us that in the end, playability, replayability and enjoy-ability is what sells games (and throwing in as muchadult content as the Japanese carriers will let you doesn’t hurt either).’’10.9 At The End Of The DayYou know, it’s actually pretty amazing that you can really write DoJagames so easily and then sell them in the biggest and most vibrant marketon Earth.

It used to be that you had to sign up as a developer or distributorfor security reasons, but that’s gone the way of the dodo. These days,i-mode users purchase and install DoJa games all the time, so it’s afantastic opportunity to get your product out there and working for you.The only remaining issue is the difficulty in getting English-baseddevelopment support. The DoJa Developer Network at www.dojadeveloper.net has some basic translated tutorials, but they tend to glossover a number of deeper issues. There are plenty of websites devotedto DoJa development, but they’re pretty much all in Japanese, so at thisstage, I can’t really recommend those to you (since I only know how tosay ‘hi’).By far, the best website for English-speaking developers outside Japanis the Mobile Developer Lab (MDL) at www.mobiledevlab.com.

Характеристики

Тип файла
PDF-файл
Размер
2,71 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6451
Авторов
на СтудИзбе
305
Средний доход
с одного платного файла
Обучение Подробнее