Welcome
Installation
Getting Started
User Interaction
Build a Game #1
Build a Game #2
Build a Game #3
Colours
Coordinates
API Reference
Globals
Window
Camera
Mouse
Key
Rect
Image
Text
Shape
Line
Screen
Sound
Base
Camera
The camera is a view applied to everything on the screen.
Notice how the rectangle moves to the left when the camera moves to the right.
__init__(x = 0, y = 0)
Call the camera initialiser. Use this to reset the camera position.
x: floatThe camera x position
y: floatThe camera y position
x: float
The x position of the camera.
y: float
The y position of the camera.
pos, position: float, float
The position of the camera.
x: floatThe camera x position
y: floatThe camera y position
scale: float, float
The scale of the camera. Decreasing the scale will zoom in to the screen.
x: floatThe camera x scale
y: floatThe camera y scale
top: float
The top position of the camera.
left: float
The left position of the camera.
bottom: float
The bottom position of the camera.
right: float
The right position of the camera.