Game Development Reference
In-Depth Information
Coordinate systems
Game Coordinates
This is where all logic will happen. Player location, enemy locations, powerup locations
- all this will have game coordinates, and it should have nothing to do with your screen
position.
Viewport Coordinates
Viewport is the position of virtual camera, that is “filming” world in action. Don't confuse
it with screen coordinates, because viewport will not necessarily be mapped pixel to pixel
to your game window. Imagine this: you have a huge world map, your player is standing
in the middle, and game window displays the player while slowly zooming in. In this
scenario, viewport is constantly shrinking, while game map stays the same, and game
window also stays the same.
Screen Coordinates
This is your game display, pixel by pixel. You will draw static information, like your HUD
directly on it.
Search WWH ::




Custom Search