프로그래밍/AndEngine

AndEngine - 핵심 용어

가카리 2014. 2. 11. 23:41
반응형

 

http://www.andengine.org/forums/tutorials/andengine-core-terminology-t316.html


BaseGameActivity:

The BaseGameActivity is the root of a game, that contains an Engine and manages to create a SurfaceView the contents of the Engine will be drawn into. There is always exactly one Engine for one BaseGameActivity. You can proceed from one BaseGameActivity to another using common Android mechanisms.

 

 BaseGameActivity는 andengine으로 작성된 게임의 기본이다. 내부에 Engine 클래스 멤버를 포함하고 있고 Engine내의 컨텐츠들을 그리기 위한 SurfaceView를 생성하는 일을 한다. 하나의 BaseGameActivity에는 항상 하나의 Engine만이 존재한다. 일반적인 Android 메커니즘으로 하나의 BaseGameActivity에서 다른 BaseGameActivity로 진행할수 있다.

 


Engine:

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. There usually is one Scene per Engine, except for the SplitScreenEngines.

 Engine은 게임을 작은 단위의 시간 스텝으로 진행하게 해준다. Engine은 주기적으로 Drawing과 Scene업데이트를 동기화시키는 일을 한다. Scene 은 게임에서 현재 active하게 취급되어야하는 모든 컨텐츠들을 포함하고 있다. 대개 Engine 하나에 Scene 하나이다. 단 SplitScreenEngines는 예외이다.


 



IResolutionPolicy:
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. 

 EngineOptions이 생성할 때 IResolutionPolicy 인터페이스의 구현을 지정하게 된다. 이 인터페이스의 구현은 Andengine이 다른 디바이스들의 다른 화면 크기를 어떻게 처리할지를 결정한다. 예를 들어 RatioResolutionPolicy는 지정된 비율을 유지하는 화면의 최대 크기 만큼 SurfaceView를 확장한다. 이는 SurfaceView가 가능한 최대 크기로 지정되어도 오브젝트들을 왜곡시키지 않는다는 뜻이다.


Camera:
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, except for the SplitScreenEngines. There are subclasses that allow zooming and smooth position changes of the Camera.

 Camera는 화면에 그려질 Scene의 사각형(영역)을 정의한다. 이는 항상 모든 scene이 보여지는게 아니기때문이다. 대게 Scene 당 하나의 Camera가 존재한다. 단 SplitScreenEgneines는 예외이다. Camera 확대/축소(Zoom)과 부드럽게(smooth) 위치 변경을 가능하게 하는 subclass들도 있다.


Scene:
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.

 Scene은 화면에 그려지는 모든 오브젝트들의 root 컨테이너이다. Scene 은 특정 개수의 Layer들을 가지고 있다.(생성시에 지정)  이 layer들은 (고정 또는 동적인) 개수의 Entity 들을 포함할수 있다. Camera가 어느 위치를 보여주던지간에 상관없이 Scene의 동일하게 위치하는 CameraScene/HUD/MenuScene 과 같은 Subclass들이 있다.


 


Entity:
An Entitiy is an object that can be drawn, like Sprites, Rectangles, Text or Lines. An Entity has a position/rotation/scale/color/etc...

 Entity는 그려질수 있는 모든 오브젝트들이다. Sprites, Rectangles, Text 또는 Lines와 같은 것이 있다. Entity는 position/rotation/scale/color/등의 속성을 가진다.


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. Therefore AndEngine assembles a Texture from a couple of ITextureSources, so the space can be used better.

 Texture는 그래픽칩의 메모리내에 있는 '이미지(image)'이다. Android에서 texture의 width와 height는 2의 n승이 되어야만 한다. Andengine에서는 두개의 ITextureSource로부터 Texture를 조합하기때문에 더 나은 공간활용을 할수 있다.


ITextureSource:
An implmentation of the ITextureSource-interface like AssetTextureSource manages to load an image onto a specific position in the Texture.

 AssetTextureSource와 같은 ITextureSource 인터페이스의 구현은 Texture내의 특정위치에 이미지를 로드하는데 활용한다.


 


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.

 TextureRegion은 Texture에서의 사각형 영역을 정의한다. TextureRegion은 시스템이 큰 Texture에서 어떤 부분이 Sprite 표현에 사용되는지를 알수있도록 하는데 사용한다.



PhysicsConnector:
A PhysicsConnector manages to update the AndEngine-Shapes (like Rectangles/Sprites/etc...) when their physics representations "bodies" change. Once using Physics (and a PhysicsConnector) with an AndEngine-Shape you'd disable the Physics calculated by AndEngine itself, by calling setUpdatePhysics(false) to the Shape. Changes made to the AndEngine-Shape are not reflected in the Physics - you have to call the methods on the Body object you have used to create the PhysicsConnector.
반응형