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

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

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

The unit offrequency, Hertz (Hz), may also be used in relation to fps, but in generalfps denotes a value which may change depending on the complexityof a game scene (for example, very complex explosions may result in areduced frame rate), while frequency is used to represent the unchangingperiodic update of the screen by the display hardware.3.3.1 How Many Frames Per Second Are Enough?In film and animation, fps defines the fixed rate at which images arecaptured or displayed to represent motion.

The illusion of movementis created when still images are displayed so rapidly as to satisfy theviewer’s visual interpretation of a continuous scene. For certain typesof games, the frame rate and stability of the rate are very important forcreating believable, immersive worlds. Within some parts of the PC gamescommunity, a culture of competition has emerged whereby developersbuild new systems and use techniques, such as over clocking and watercooling, to increase the processing speed and thus the frame rate of thegame. When the rate approaches around 75 fps, the frequency reacheswhat is known as the flicker fusion factor, and the human eye cannotreally distinguish higher frequencies.Motion pictures in the cinema are usually played at 24 fps and television is broadcast at no more than 30 fps (in the case of the AmericanNTSC broadcast standard).

This would seem to indicate a reasonabletarget range of between 24–30 fps to aim for achieving credible motion,but that’s not the whole story.A frame of cinema film is not like a discrete animation frame. There isno such thing as an instance in film. A film camera has a rotary shutterwhich interrupts the light two or three times for every film frame, andso it exposes each frame to two or three steps of motion.

Also, just likestill camera film, cinema reel film is sensitive to all the light and hencecaptures the continuous motion which occurs during an exposure. Theend result is that a lot of motion is compressed it into a single image. Thisis why even a DVD shows signs of motion blur when a frame is pausedon an action scene.

An analogy from the animation industry helps toillustrate this, as the following section will show.3.3.2 Stop Motion AnimationCreating stop motion animation, such as Aardman Animation’s ‘Wallaceand Gromit’ films, is a laborious task. The film is played back at 24 fpsbut may be shot ‘on twos’ which means taking two exposures for eachpose. This results in an effective 12 frames of animation per second whenplayed back on a standard cinema film projector.22For more about the Wallace and Gromit stop motion rendering technique, see, forexample, the Wikipedia entry at en.wikipedia.org/wiki/Wallace and Gromit.66GRAPHICS ON SYMBIAN OSAt 12 fps, an animator wishing to move a character’s head from left toright over a two second interval would need to issue 24 small incrementsto the character’s head in order to get the desired timing and then issuetwo shots per motion so that it will play back at the correct rate.

For actionscenes however, the animators shoot ‘on ones’ (i.e., 24 fps), and someframes are even shot with multiple exposures, producing a cinematic,faux motion, blur effect.In fact, OpenGL version 1.1 makes use of an accumulation bufferwhich is able to simulate effects such as motion blur by accumulatingseveral redraws into a single frame,3 although this is not possible withOpenGL ES. Since this is quite a costly operation in terms of processorspeed and memory, it’s not commonly used in games. It is illustrated inFigure 3.1.Figure 3.1 Simulation of a motion blur multiple exposure by accumulating frames in asingle buffer3.3.3 Frame Rate In PracticeAs illustrated above, it’s perfectly possible to produce convincing movement at 12 fps, but rapid movement requires more frequent updates inorder to avoid a juddering effect.The frame rate required to provide a smooth game experience variesaccording to game genre. A simple puzzle game such as a twodimensional chess game may require updates to a small part of thescreen at a time, whereas a 3D first person shooter may require the wholescreen to be redrawn because the viewing point has changed.Frames per second in games may also vary based on the complexityof a game (or a particular scene) and by the hardware, especially onplatforms where the hardware is not standardized, such as a PC.

It’scommon to have a trade-off between performance and detail.3More about motion blur using an accumulation buffer in OpenGL can be found atfly.cc.fer.hr/∼unreal/theredbook/chapter10.html.ABOUT DISPLAY MEMORY67In practice, 24–30 fps is around the minimum frame rate required torepresent a smooth immersive world for any game with significant motion,especially 2D scrolling games and 3D games. But in terms of achievingsmooth updates, synchronization to the display hardware becomes morerelevant than raw frame rate.

It helps to understand a little bit more aboutdisplay technology to complete this discussion about frame rate.The LCD Display RateAn important factor connected to frame rate is how often the frame buffer(described in more detail in section 3.4) gets drawn to the screen, whichis independent of the frame rate of the game, and is set by a fixed clockon the LCD controller. There is little point optimizing a game to render120 fps if the LCD only refreshes at 60 Hz (unless using an accumulationscheme as mentioned in section 3.3.2).As mobile handsets require support for more demanding use cases,mobile display controllers are becoming a lot more complex in theiroperation. For a display device, 60 Hz should be considered a bareminimum because a lower update frequency is known to cause fatigue andeyestrain in many people. A frequency of 70–75 Hz should be acceptablefor most users, while for some 85 Hz is much more comfortable.

Anythingbeyond that is unnecessary for a mobile device, and may simply drainbattery power.On mobile handsets, the refresh rate of the LCD controller is significantto the frame rate of a game because the game can only draw a new frameas fast as the display driver can update the screen.3.4 About Display MemoryOn Symbian OS, the term ‘frame buffer’ usually refers to a region ofsystem-accessible memory used to represent the pixels of the LCD. Earlymobile controllers used to work much like CRT displays with the framebuffer being scanned at a fixed frequency by the display hardware.Many LCD controllers shipping in devices based on Symbian OS v9.2or v9.3 come with on-board display memory that is not addressable bythe CPU.

In these cases, a chunk of system mapped memory is allocatedfor the frame buffer as usual, but the LCD driver may have to be told whento refresh its internal screen buffer. Typically a scheme will be in placewhereby only regions of the screen that have changed will be copied inorder to reduce the memory bandwidth.Figure 3.2 demonstrates how a screen (simplified to 8 × 8 pixels forillustration purposes) might be updated after a line has been drawn in theframe buffer.

The illustration shows that only the rows that differ fromthose in the LCD’s memory are copied over.68GRAPHICS ON SYMBIAN OSDMADMAUpdateDMADMALCD ControllerFigure 3.2RowsCopiedFrameBufferHow a frame buffer may interact with an LCD display on Symbian OSSome handsets implement a TV out feature.

Since the TV output isgenerated from the LCD’s buffer, what you see on the LCD screen isexactly what appears on the TV (this includes direct drawing to the framebuffer).A controller may support overlays in hardware and, in some cases,support direct rendering of the camera’s viewfinder to the screen inhardware. However, very little of this technology will be exposed directlyto third party application or game developers, since it is very handsetspecific.The important thing to understand is that as far as most code isconcerned, the frame buffer is an area of memory representing a screenwhich is mapped into all processes allowing any piece of code to modifythe contents. The Symbian OS graphics framework takes care of arbitratingall drawing to the screen and is covered in the next section.3.5 A Primer on Drawing on Symbian OSSymbian OS provides a UI toolkit based around the concept of a control.In its most simplistic view, a control is a rectangular area of screenrepresented by a CCoeControl-derived class.

The control is responsiblefor issuing the drawing commands required to draw and redraw the areaof screen which it owns.In order for a control to issue drawing commands, it requires arendering context known as a window. A window is similar in concept tothe windows found on desktop systems in that it represents a (potentiallyoverlapping) region owned by an application.

When a window needsto be redrawn, the redraw system delegates the drawing request to eachcontrol on the window’s surface. A control may create its own windowand occupy the whole window area or it may use part of its parentwindow. A control that uses another’s window is known as a lodgercontrol, as shown in Figure 3.3.A PRIMER ON DRAWING ON SYMBIAN OS69System Status BarMain applicationCCoeControl and ownerof a RWindow which fillsthe client rectLodgerCCoeControlLodgerCCoeControl“Hello Dave”CancelFigure 3.3OKA simple representation of an application, showing lodger controls3.5.1 Reuse of Controls Across UI PlatformsS60, UIQ and MOAP (the UI platform for FOMA phones) all providetheir own UI toolkits which contain standard controls for list boxes,menus, dialog boxes and so on, each tailored to the look and feel of theirrespective platforms. There is little re-usability across platforms; a list boxclass on S60 is implemented using a completely different control to thatused on UIQ.However, when developing a custom control, the basic CCoeControlframework that Symbian OS provides is common across UI platforms.

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

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

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

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