Главная » Просмотр файлов » 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), страница 57

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

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

The underlying alignment of display and keys ishandled in the background by the platform. Avoiding the code required248THE N-GAGE PLATFORMto handle even a single issue like this saves a developer a significantamount of implementation time, as well as testing effort.To guarantee to the N-Gage game development community that theirgames will port seamlessly between N-Gage compatible phones requiresa lengthy internal process within Nokia to ensure that the N-Gage SDKbehaves the same on each phone. SDK testing is performed using astandard set of tests to verify that each device behaves correctly whenusing every API provided by the N-Gage SDK. This is called terminal, ordevice certification.The device certification teams also play an important role in verifyingthe technical solutions to known issues where different behavior existsacross devices.

For example, a game should include a screensaver fordisplay when the game is idle. At the S60 architecture level, this getscomplicated, because the native screensaver functionality varies acrossdifferent S60 product versions. The N-Gage platform must hide this, andexpose a simple interface to the game. The solution must also provideflexibility to incorporate new behaviors in the future without breakingbinary compatibility. As should be clear from the above examples, thetechnical ambition behind the promise of providing an abstraction layerin the SDK is certainly a challenging one.8.3 The N-Gage SDKThe experience of the N-Gage game publishing team showed Nokiathat conversion of a game title from other platforms’ hardware wasalso not straightforward. The mobile phone as a computing devicehas very different requirements from other platforms.

Symbian OS wasdesigned to be fit for purpose and, while the operating system is ideal formobile telephony, specialist applications such as personal informationmanagement and enterprise support, the programming paradigm is quitedifferent from that used to create games for other platforms. This typicallyresulted in the game developers re-writing a large amount of the codebase to convert it for N-Gage devices, making it an expensive option forgame ports.In addition to the abstraction layer described above, the N-Gage SDKalso abstracts Symbian OS and provides a POSIX compliant, standardC/C++ layer over Symbian OS. The result is a much more straightforwardconversion of game code from other established platforms, because gamedevelopers, familiar with other platforms, no longer have to learn SymbianOS C++ idioms, like active objects and descriptors, before they can porttheir code.

As a result, large parts of the game logic can be ported moreor less directly to the N-Gage platform, leaving the development teamwith time and resources to focus on addressing special design issues withthe game relevant to the N-Gage platform.THE N-GAGE SDK249The N-Gage SDK extends the initiative from Symbian and Nokiawhereby the P.I.P.S.

(a recursive acronym for ‘P.I.P.S. is POSIX onSymbian OS’) and Open C libraries make standard C libraries availablefor Symbian OS v9 devices. P.I.P.S. and Open C are described in moredetail in Chapter 7. They add standards support for basic operating systemfunctionality, including:• APIs for string handling, file system access, maths, thread handling,and DLL loading (libc, libm, libpthread, libdl)• some additional open source libraries for cryptography and SSL(libcrypt, libcrypto, libssl) and compression (libz)• an additional general purpose utility library (libgl).Open C does not supply any access to the special capabilities of theS60 hardware, such as camera, vibra, or telephony, nor does it offerinterfaces to S60 application data such as calendar, contacts, messaging,or multimedia playback.8.3.1 RGA APIsThe N-Gage SDK adds a set of real-time graphics and audio (RGA)APIs.

These APIs are targeted specifically at games requiring high-qualitygraphics and multimedia content, and were developed with input fromprofessional game developers working with Nokia. In conjunction withOpen C, the RGA APIs enable developers to write games using familiarC/C++, rather than using the idioms of C++ on Symbian OS. At the timeof writing, these ‘industrial-strength’ game APIs are part of the N-GageSDK only, which means that they are currently only available to officialN-Gage developers.

However, the RGA libraries are expected to becomemore widely available to S60 developers in the near future, with accessto the APIs that were made part of the general S60 offering, making thelibraries available for use by all developers, albeit supported on selectedS60 devices only.The main features of the RGA APIs are described in the followingsubsections, and illustrated in Figure 8.5.Device InformationAPIs are provided to obtain information about the phone’s capabilitiesand status information.The Device Capabilities API provides developers access to informationfrom an S60 device that is used to determine if the device is qualified forN-Gage game playing, and to get information on the CPU and whetheradditional features exist that allow enhanced game functionality, such asfloating point support and the amount of RAM available to the game.250THE N-GAGE PLATFORMFigure 8.5RGA librariesThe Device Status API is a library which provides interfaces to retrievethe current status of various hardware features, including specific information about the battery, network signal, connected accessories (such asheadsets), telephony, alarms, and current profile.The API can also be used to receive notification of changes to thedevice status, through a set of callback interfaces for the following:• changes to the battery level• connection or disconnection of the main charger• changes to the network signal• changes to the GSM cell ID or location area code of the phone• connection or disconnection of an accessory• changes to the phone’s profile (such as the settings for keypad tones,warning tones, flight mode, ring tones volume, display language)• notification of an incoming phone call, and its termination• notification of an alarm.Hardware AccessThese APIs provide controls for the device hardware, such as the lights(screen backlight for the primary and secondary displays, and keypadlights) and the vibra for phone vibration.

The APIs can also be used toprovide dynamic information about changes to the hardware, such aschanges to the vibra setting.THE N-GAGE SDK251DisplayThe Display API provides system-independent window handles for all ofthe phone’s displays. These window handles are required to create a backbuffer on the specific display.

The API provides notification of changes tothe orientation of the display – and can also be used to return the displaysettings and capabilities–and allows adjustment of some of those settings,if the underlying system supports it. Display settings include brightness,contrast and gamma correction values. The capabilities returned by theDisplay API include the native size and resolution, orientation, and colorformats.InputThe Input API provides information on the states and state changesof different input devices, such as embedded keypad and four-waycontroller, and external input devices connected to the phone via USB orBluetooth wireless technology.The Text Input API is also provided for handling text input on keypadsin multi-tapping, predictive text input and numeric mode.

The Text InputAPI supports Western typing as well as the following Chinese text inputspellings: stroke, Shuyin, and Pinyin.TimingThe Timing API provides standard and high-resolution timers. Both periodic and one-shot timers are available:• Periodic timers: After starting the timer, it runs for the given time. Afterthe time has expired, it restarts automatically. The timer will continueto run until it is stopped or released.• One shot timers: After the timer is started, it runs until the set timeperiod is exceeded.

The timer has to be restarted manually after itexpires.Image RenderingThe Back Buffer API allows drawing to the screen without tearing andflickering effects. It also allows changes to the orientation of the screencontent.The API provides a device-independent double-buffered graphicsscheme consisting of a screen buffer and a secondary buffer calledthe back buffer, which can be accessed and drawn into. When drawingis completed, the contents of the back buffer are moved to the screenbuffer and become visible on the screen. Single or chained back buffersare supported.252THE N-GAGE PLATFORMThe Bitmap API is an interface to create and manipulate bitmaps andincludes the functionality to:• perform masked blits from one graphics device to another graphicsdevice, such as, a bitmap or the back buffer• perform alpha-blended blits from one graphics device to anothergraphics device• use self-defined color palettes• scale and rotate the content of graphics devices• access and modify pixels.The Images API allows you to load and save images from files ofdifferent color formats, and load images from memory buffers.FontsThe Fonts API provides a system-independent interface for drawing textto a graphics device (back buffer or bitmap surface) using system fontswith a specific font face, size, and style.

It also provides an interface tocreate game-specific bitmap fonts and draw text to a graphics device ona particular point. Common features for system fonts and bitmap fontsinclude:• drawing text to a graphics device (back buffer or bitmap)• retrieving the size occupied by the text drawn• applying text effects like underline and strikethrough to the text• drawing text in different directions• drawing text with the user-specified color• drawing text to the graphics device from the given target point.The following system font features are available:• installing and uninstalling system fonts• getting the installed system font count• getting information about the currently installed fonts on the system• converting unit size in twips to pixels.The supported system font formats are TTF (True Type fonts) and GDR(Symbian OS bitmap format).

Bitmap font support includes:THE N-GAGE SDK253• setting the kerning information between the characters• setting the transparent color for the text in RGB format• selecting whether transparency should be used or not• setting default spacing between the characters.2D Vector Graphics: SVG-TThe Scalable Vector Graphics – Tiny (SVG-T) API provides interfaces toload static or animated SVG files and to perform graphical operations suchas pan, scale, and rotate.

Support is available for SVG-T, SVGB (preparedSVG in binary format), SVGZ (Zipped SVG), PNG, and JPEG files. TheSVG-T API returns a bitmap object that may be blitted onto the back buffer.AudioThe High-Level Audio API provides a set of functions for playing, recording, and mixing audio. Typical use cases supported include the following:• retrieving the capabilities of the audio mixer• initializing and configuring the mixer• playing back sound on the mixer and stopping the mixer• adjusting the mixer playback settings• adjusting the individual playback settings• pausing or stopping playback of a sound• managing sounds in logical units (tracks)• recording audio data.An additional Compressed Audio API is available for configurable lowlevel audio playback and recording.

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

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

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

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