1.Camera Screen Space
The Game Camera is possibly one of the most powerful entity in the vast amount of entities of game development.
The Game Pencil Engine takes a simple 2D approach to game cameras.
Up to 8 game cameras are able to be used in the Game Pencil Engine.
Game Cameras are reset once the game scene has been changed or the game resets.
Game Camera Ids start from zero like arrays(thus they range from 0 to 7).
2.Using Multiple Cameras
Most games played use only one game camera(thus the reason only camera is only enabled by default).
There are instances where you may wish to use multiple cameras:
- Local multiplayer games with split-screen support
- Games with emulated cameras within the game world.
- Cutscenes which may want to show multiple parts of the scene at once.
- Other advanced uses of graphic processing.
If you find yourself using any of the above, it is recommended to use multiple cameras with caution in regards to the game’s fps.
Center the camera around object.
Simply place this in an object’s main logic function and the camera will follow the object:
gpe.center_camera( 0,this.getx(), this.gety() );