Example: 2D Game Space
![]() |
| 2D Game Space. |
This example illustrates 2D Game Space, position, and the x and y variables.
Instructions
Use the arrow keys to move the black pixel.
Notice that :
- x increases when the pixel moves right
- x decreases when the pixel moves left
- y increases when the pixel moves down
- y decreases when the pixel moves up
- You can move the pixel outside of the screen.
- If you move the pixel past the top edge of the window , the y becomes negative.
- If you move the pixel past the left side of the window, the x becomes negative
Note that a view has been used to make the pixel big enough to see. The only important part of this example is understanding 2D game space.
Download Example
Download: 2d-game-space.gmk (right click and choose "Save As…")
This example is a .gmk file. It is editable, but only usable with Game Maker 7.
Related Pages
Backlinks
These pages link to this page. They may be useful.
| Categories: Position |
