I ran into a problem that is probably extremely common in game design.
- Suppose we have a 2D world
- World Size - M x N rect
- The world may contain some elements in it.
- Elements have (x, y) coordinates
- The world can be viewed through the physical physical (mxn) window.
- The browser window can be enlarged / reduced
- The browser window can be panned up / down + left to right, while in extents of the rect world.
How do I implement this? I am particularly concerned about the browser window. Can anyone recommend any good readings?
This is not homework - it is more a task that I set for myself.
source
share