release_notes.txt
来自「Symbian平台下的一个3D赛车游戏源码」· 文本 代码 · 共 157 行
TXT
157 行
Symbian OS: 3D Game Engine Example v1.2
-------------------------------------------------
This C++ code example demonstrates a simple 3D engine. The engine produces a
simple game where you can drive a car around a wide parking lot. Everything
seen on the screen is rendered in 3D.
The example utilizes OpenGL ES and an own rendering implementation for platforms not
supporting OpenGL ES. This example supports S60 2nd Edition and Series 80 2nd Edition
devices. A separate example is available for S60 3rd Edition at www.forum.nokia.com.
--------------------------------------------------------------------------------
PREREQUISITES
Symbian C++ basics
Basics of 3D graphics
All the techniques used in the 3D are commonly known math and 3D graphics
techniques. More information about the techniques used in the example can be
found from the Internet with, for example, the following keywords:
"3D clipping"
"frustum clipping"
"3D rotating matrices"
"3D vertex projection"
"painter's algorithm"
"texture mapped polygons"
"fast affine mapping"
--------------------------------------------------------------------------------
IMPORTANT FILES/CLASSES
The most important Symbian/S60 APIs in this example are:
- OpenGL ES API to draw 3D objects
- CIdle for timer
- Math for algorithms
- CImageDecoder to load textures
- CAknKeySoundSystem to disable key tones
The C3DRenderer takes care of rotating the objects in place in 3D space and
drawing them in the right order. The drawing pipeline works as follows:
In C3DRenderer:
- Rotate objects to the right position according to the camera
- Sort objects to be drawn from back to front (painter's algorithm)
- Command MObject-derived objects to draw themselves
In CPolygonObject (which is derived from M3DObject)
- Rotate polygon's corner points (vertices) to the right position
- Clip polygons against view frustum (might increase or decrease triangle count)
- Sort polygons to be drawn from back to front (painter's algorithm)
- Draw polygons
By default, the only 3D object type implemented is a polygon object which consists
of textured triangles. Any types of 3D objects can be implemented - for example,
light balls which are only zoomed sprites. The parking lot is tiled from asphalt
type tiles and the car is created with 5 objects: the car body and 4 wheels which
can be moved and tilted independently.
For sorting objects and polygons, an implementation of Quick Sort is used.
Rotation is implemented with matrix multipliers, and clipping against frustum uses
a dot product between plane normals and clipped vertex.
The engine uses two methods to draw the buffer to the physical screen.
- CFbsBitmap's BitBlt function, which is always a safe method
- Straight memory copy from draw buffer to screen memory, which is fast
The BitBlt method is always used on an emulator and always when there is anything
else than the game on the screen (like "Charging" window). The memory copy method
is used when the whole screen is used by the game on target hardware.
The engine uses CIdle timer to provide timing for the game. It gives all idle time
from the operating system to game, so it is as fast as possible without interfering
the operating system, especially the UI.
--------------------------------------------------------------------------------
KNOWN ISSUES
- Early OpenGL implementations have an issue that prevents correct screen size change
and the screen is, therefore, not correctly drawn. Due to the problem, it will look
as if only part of the screen is drawn after switching to full screen. This problem
may be visible in both the emulator and the device. The problem exists in the first
Nokia 6630 software (2.39.15), but has been fixed in the later Nokia 6630 software
(3.45.11). Similarly, the problem is visible in the device emulator with the Series
60 2nd Edition SDK for Symbian OS, Supporting Feature Pack 2, For C++.
- Early versions of the Series 80 SDK (not devices) may also be incompatible with this software.
If problems occur, update your Series 80 SDK to the latest version.
- In S60 2nd Edition, FP3 devices, graphics need to be shown first in full screen, before setting rect to
partial screen.
--------------------------------------------------------------------------------
RUNNING THE EXAMPLE
The game starts in full-screen mode. The menu can be accessed normally with the left
softkey, and the right softkey is used for exit. Other keys are described below:
[7] or Up Arrow: throttle
[4] or Down Arrow: reverse
[5] or Left Arrow: left turn
[6] or Right Arrow: right turn
--------------------------------------------------------------------------------
BUILD & INSTALLATION INSTRUCTIONS
Extract the example into the same drive as Symbian SDK, and use command prompt to compile the project:
If you are using pre-v9 SDK, build from the following folders:
- If you are using S60 2nd Edition without OpenGL ES, build from the group60 folder.
- If you are using S60 2nd Edition with OpenGL ES, build from the group60_ES folder.
- If you are using Series 80 for the Nokia 9500, build from the group80 folder.
To create a visual studio 6 workspace, type:
bldmake bldfiles
abld export
abld makefile vc6
To build for the emulator:
bldmake bldfiles
abld build wins udeb
To build for a target device:
bldmake bldfiles
abld build armi urel
Notes:
- Since SDK versions vary, file paths in the .pkg file might need to be changed accordingly.
- Files in the data folder need to be copied to the emulator's \epoc32\winscw\c\private\e01FF1d0
folder before use.
This should be done automatically if you have used bld.inf correctly.
- If you want to build sis with icon with Carbide, run bldmake bldfiles + abld resource
from command line (see above) before building from Carbide IDE and uncomment the mif icon
row from the carbide .pkg file.
When the build is made for a target device:
- If you are using S60 2nd Edition without OpenGL ES, use the install60 folder.
- If you are using S60 2nd Edition with OpenGL ES, use the install60_ES folder.
- If you are using Series 80 for the Nokia 9500, use the install80 folder.
- If you are using some other SDK which uses some other paths, just adjust the paths in
the .pkg file accordingly.
Go to Example3D\install folder and type:
makesis example3d.pkg
and you should have a .sis installer file that can be sent to the device.
Notes:
- Since SDK versions vary, file paths in the .pkg file might need to be changed accordingly.
- In theory, this application can be used on any screen resolution device. In addition, at least
4096 color and 65536 color screens are supported.
--Carbide.c++ IDE
1. Make sure that the path for the current Carbide workspace does not contain any whitespace characters.
If necessary, select a new workspace folder in Carbide (File -> Switch workspace
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?