⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 release_notes.txt

📁 Symbian OS S60平台2D游戏引擎案例
💻 TXT
字号:
S60 Platform: 2D Game Engine Example
--------------------------------------------------------------------------------

This C++ code example demonstrates an application with custom 2D graphics. The 
application is designed to support various S60 devices with different amounts of 
colors and various screen resolutions and orientations. The application implements 
a simple 2D game with some basic game features (audio on/off, on-screen menu). 
However, on the game architecture side, the emphasis has been more on demonstrating 
the visual look than making the game implementation reusable as such.

The key features of this application are:
A. How to make portable games.
-All texts and graphics are relative to the screen size.
  
B. How to structure a game so that it is easy and simple to create.
-The game is divided into separate "Models": TitleScreen, InGame, and HelpScreen. 
New models can be easily added by inheriting them from MModel and registering them 
in the application's container.
  
C. Efficient screen access without CDirectScreenAccess.
-The application uses the RBackedupWindow method for drawing. This method does not 
override the window server, which means it does not draw over system messages. 
This method always uses the native bit depth, and no color conversion is needed.
  
D. How to handle different display modes and screen resolutions. (Scalable UI)
-This application correctly supports the EColor4K, EColor64K, and EColor16M display modes.
-The game also supports different screen resolutions and portrait/landscape orientations. 
-The system detects the screen resolution and then adapts the drawings accordingly.

The example has been tested on the following screen resolutions:
176x208 
208x208
240x320 (QVGA Portrait)
320x240 (QVGA Landscape)
352x416 (Double Resolution Portrait)
416x352 (Double Resolution Landscape)
800x352

--------------------------------------------------------------------------------

PREREQUISITES

Symbian C++ basics

--------------------------------------------------------------------------------

IMPORTANT FILES/CLASSES

CModelGame.h
CModelGame.cpp
CBitmap.h
CBitmap.cpp
CSprite.h
CSprite.cpp

CFbsBitmap, RBackedupWindow

--------------------------------------------------------------------------------

KNOWN ISSUES

Note that this example does not implement resource allocation and memory usage patterns 
in a way that might be needed when developing a complex commercial Symbian C++ game. 
In a large size game with multiple levels, for example, all the game data should not 
be loaded at once and data sizes should not be hardcoded. Also, this example does not 
illustrate how to avoid memory fragmentation. 

From an architectural point of view, if more game levels are needed, it is better to 
split CModelGame to two separate classes - graphics engine and game-level logic.

Images of this example are delivered as .mbm images. If those are replaced by new .mbm 
images, the custom CBitmap class may not decode those correctly. 

The game does not pause for an incoming call, which should be implemented for commercial 
applications. For incoming messages, the application moves to background and it can 
be resumed by selecting the application from the task list. 

Audio issues: 
In some devices, the level of the background noise may be disturbing. To avoid it, 
the volume level is set to 0 until the user sets audio on. (implemented in CAudio.cpp, 
MaoscOpenComplete(), iStream->SetVolume).
On the Nokia E90, unmuting (setting audio on) from the PDA side does not always work 
because MMF cannot always open audio stream when high resolution screen is refreshed 
with high priority. This is fixed by using a bigger refresh interval after audio is 
opened. (see Example2DContainer.cpp, line 176-185 and CTiming.cpp, line 66)

--------------------------------------------------------------------------------

RUNNING THE EXAMPLE

1. Select the 2DExample icon from the menu and run it.

2. Select Help to read the instructions if needed.

3. Toggle Audio On/Off by selecting Unmute/Mute and press the selection key.

4. Select Start Game to play.
- The character can be moved with the scroller (left, right, up (jump)). 
- Collect all the diamonds.
- The game is over if you collide with monsters.
     
--------------------------------------------------------------------------------

BUILD & INSTALLATION INSTRUCTIONS

INSTALLATION INSTRUCTIONS

-- S60 3RD EDITION DEVICE

  The project can be compiled either for GCCE or ARMV5 target. The following 
  instructions are for GCCE:
  
  Go to /Example2D/group
  bldmake bldfiles
  abld build gcce urel 
  Go to /Example2D/sis/
  createsis create example2d_gcce.pkg
  
  Install the .sis file to a 3rd Edition device.

-- EMULATOR

  First, make sure that the export paths in the .bld file are correct.
  
  Go to /Example2D/group
  bldmake bldfiles
  abld build winscw udeb
  Start the emulator.
  Select the Example2D application and start it.

--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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -