In this article, I will try to cover description, of the most important engine concepts. Brief information, such as description of most frequently used classes and their extensions.
1. AndEngine - 重要な専門用語 (ニコラス・グラムリック氏の説明に加筆しています)
1. AndEngine - Core Terminology (by Nicolas Gramlich + updates and addons)
The Engine make the game proceed in small discrete steps of time. The Engine manages to synchronize a periodic drawing and updating of the Scene, which contains all the content that your game is currently handling actively. You can use also subclasses:
LimitedFPSEngine - tries to achieve a specific amount of updates per second.
An implementation of the IResolutionPolicy interface is part of the EngineOptions. It tells AndEngine how to deal with the different screen-sizes of different devices. I.e. RatioResolutionPolicy will maximize the SurfaceView to the limiting size of the screen, while keeping a specific ratio. That means objects won't be distorted while the SurfaceView has the maximum size possible.
RatioResolutionPolicy - keep everything scaled in in proper ratio (disadvantage - black lines might occur)
FillResolutionPolicy - fill whole resolution (disadvantage - images might be stretched)
A Camera defines the rectangle of the scene that is drawn on the screen, as not the whole scene is visible all the time. Usually there is one Camera per Scene. There are subclasses with more functions, example:
BoundCamera - you might specify bounds for your scene.
ZoomCamera - you might enable zooming, pinch zoom, and scrolling camera.
Scene:
Scene クラスは、画面に描写する全てのオブジェクトの最上位に位置するコンテナです。 Scene は特定数のレイヤーを持っており、レイヤー自身はいくつかのEntityを(固定的もしくは動的に)保持することができます。
camera の位置に関わらずScene の同じ位置に自身を描写する、CameraScene/HUD/MenuSceneのようなサブクラスがあります。
The Scene class is the root container for all objects to be drawn on the screen. A Scene has a specific amount of Layers, which themselves can contain a (fixed or dynamic) amount of Entities. There are subclasses, like the CameraScene/HUD/MenuScene that are drawing themselves to the same position of the Scene no matter where the camera is positioned to.
HUD - usage for example for score (it has to be all the time in the same position, follow camera changes)
An Entitiy is an object that can be drawn, like Sprites, Rectangles, Text or Lines. An Entity has a position/rotation/scale/color/etc.
Sprite - entity with texture
TiledSprite - entity with tiled texture, you may switch between tiles.
AnimatedSprite - extension of the TiledSprite, you may animate tiles in specified intervals.
Texture:
Texture とは、グラフィックチップのメモリ内の'画像'です。
Android では、Texture の横幅と高さは2の冪数でなければなりません(最新版 GLES2ではこの決まりは必須ではありませんので、メモリ使用量を減らすのに有用です)。したがって AndEngine assembles a Texture from a couple of ITextureSources, so the space can be used better.
Texture:
A Texture is a 'image' in the memory of the graphics chip. On Android the width and height of a Texture has to be a power of 2 (in latest GLES2 this rule is not required, so its really useful to reduce memory usage) Therefore AndEngine assembles a Texture from a couple of ITextureSources, so the space can be used better.
TextureRegion:
A TextureRegion defines a rectangle on the Texture. A TextureRegion is used by Sprites to let the system know what part of the big Texture the Sprite is showing.