carExample3D

所属分类:Symbian
开发工具:Visual C++
文件大小:395KB
下载次数:21
上传日期:2009-07-03 21:42:14
上 传 者wcx40796052
说明:  symbain s60 2rd 游戏中的小汽车 可以运行的,对游戏开发很有好处
(symbain s60 2rd car game)

文件列表:
Example3D\aif\context_pane_icon.bmp (5864, 2004-10-22)
Example3D\aif\context_pane_icon_mask.bmp (5864, 2004-10-22)
Example3D\aif\Example3Daif.rss (524, 2005-01-19)
Example3D\aif\list_icon.bmp (3768, 2004-10-22)
Example3D\aif\list_icon_mask.bmp (3768, 2004-10-22)
Example3D\data\font.gif (4672, 2004-10-20)
Example3D\data\picture.jpg (5942, 2004-09-22)
Example3D\data\picture2.jpg (4886, 2004-09-22)
Example3D\group60\ABLD.BAT (311, 2009-07-03)
Example3D\group60\bld.inf (582, 2005-01-19)
Example3D\group60\Example3D.mmp (1205, 2005-01-19)
Example3D\group60\Example3D.rss (1597, 2005-01-19)
Example3D\group60\Example3D_Caption.rss (447, 2005-01-19)
Example3D\group60_ES\bld.inf (584, 2005-01-19)
Example3D\group60_ES\Example3D.mmp (1239, 2005-01-19)
Example3D\group60_ES\Example3D.rss (1597, 2005-01-19)
Example3D\group60_ES\Example3D_Caption.rss (449, 2005-01-19)
Example3D\group80\bld.inf (586, 2005-01-19)
Example3D\group80\Example3D.mmp (1195, 2005-01-19)
Example3D\group80\Example3D.rss (2227, 2005-01-19)
Example3D\group80\Example3D_Caption.rss (448, 2005-01-19)
Example3D\inc\3DObjects.h (5371, 2005-01-19)
Example3D\inc\3DTypes.h (5090, 2005-01-19)
Example3D\inc\C3DBase.h (2321, 2005-01-19)
Example3D\inc\C3DRenderer.h (3348, 2005-01-19)
Example3D\inc\CEngine.h (3556, 2005-01-19)
Example3D\inc\CFpsCounter.h (1304, 2005-01-19)
Example3D\inc\CGame.h (4531, 2005-01-19)
Example3D\inc\CGameTimer.h (1571, 2005-01-19)
Example3D\inc\CPictureLoader.h (1733, 2005-01-19)
Example3D\inc\CPolygonObject.h (5758, 2005-01-19)
Example3D\inc\Example3D.hrh (635, 2005-01-19)
Example3D\inc\Example3DApp.h (1247, 2005-01-19)
Example3D\inc\Example3DAppUi.h (1352, 2005-01-19)
Example3D\inc\Example3DContainer.h (1580, 2005-01-19)
Example3D\inc\Example3DDocument.h (1304, 2005-01-19)
Example3D\inc\M3dObject.h (960, 2005-01-19)
Example3D\inc\MGame.h (1126, 2005-01-19)
Example3D\inc\MGameTimerObserver.h (647, 2005-01-19)
Example3D\inc\TBitmap.h (650, 2005-01-19)
... ...

OVERVIEW ======== This example application is a demonstration of an simple 3-D engine. The engine is used to produce a simple game where you can drive an 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. ENGINE IMPLEMENTATION ===================== The C3DRenderer takes care of rotating the objects in place in 3D space and drawing them in right order. The drawing pipeline works like this: In C3DRenderer: - Rotate objects to right position according to 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 right position - Clip polygons against view frustum ( might increase or decrease triangle count ) - Sort polygons to be drawn from back to front ( again the painter's algorithm ) - Draw polygons By default the only 3D-object type implemented is polygon object which consists of textured triangles. Any type 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 made with matrix multipliers and clipping against frustum uses dot product between plane normals and clipped vertex. The engine uses two types of drawing the buffer to physical screen. - CFbsBitmap's BitBlt function which is always safe method - Straight memory copy from draw buffer to screen memory, which is fast The BitBlt method is used always on emulator and always when there is anything other but the game on the screen (like "Charging" window). The memory copy method is used when the whole screen is in game's use on target hardware. The engine uses CIdle timer to provide timing for the game, which gives all Idle time from the OS to game, so it's as fast as possible without interfering the OS, especially UI. COMPATIBILITY ============= Tested hardware: - Nokia 3650 - Nokia 6600 - Nokia N-Gage - Nokia 6630 ( OpenGL ES ) - Nokia 9300 Communicator - Nokia 9500 Communicator Known Issues: - Early OpenGL implementations have an issue which prevents correct screen size change and thereby screen is not correctly drawn. Problem shows as if only part of the screen is drawn after switch to fullscreen. This problem may be visible in both emulator and phone. The problem exists in first 6630 sw (2.39.15), but has been fixed for the later 6630 sw (3.45.11). Similarly the problem is visible in the phone emulator with the Series 60 2nd Edition SDK for Symbian OS, Supporting Feature Pack 2, For C++. - Also early versions of Series80 SDK (not devices) may be incompatible with this software. If problems occur, update your Series80 SDK to the latest version. BUILDING ======== Extract the example into same drive as Symbian SDK, and use command prompt to compile the project: - if you are using Series60, build from group60 -folder - if you are using Series60 v2.0 with OpenGL ES, build from group60_ES -folder - if you are using Series80 for Nokia 9500, build from group80 -folder To create visual studio 6 workspace, type: bldmake bldfiles abld export abld makefile vc6 To just build for emulator: bldmake bldfiles abld build wins udeb To build for target phone: bldmake bldfiles abld build armi urel INSTALLATION TO DEVICE ====================== When build is made for target phone: - if you are using Series60, use install60 -folder - if you are using Series60 v2.0 with OpenGL ES, use install60_ES -folder - if you are using Series80 for Nokia 9500, use install80 -folder - if you are using some other SDK which uses some other paths, just adjust the paths in .pkg-file accordingly. Go to Example3D\install folder and type: makesis example3d.pkg and you should have a .SIS installer file which can be sent to phone. Notes: - As SDK versions vary, file paths in pkg-file might need to be changed accordingly. - In theory this application can be used on any screen resolution device. Also at least 4096 color and 65536 color screens are supported. IMPLEMENTATION NOTES ==================== All these techniques used in the 3D are commonly used math and 3D-graphics knowledge. More information about the techniques used in the example can be found from the internet with keywords like: "3D clipping" "frustum clipping" "3D rotating matrices" "3D vertex projection" "painter's algorithm" "texture mapped polygons" "fast affine mapping"

近期下载者

相关文件


收藏者