Search code examples
pseudocode2d-engine

2D World design question


I'm facing a problem which is probably extremely common in game-design.

  1. Let's assume that we've got a 2D world
  2. The world's size is M x N rect
  3. The world may contain some items in it
  4. The items have (x,y) coords
  5. The world can be browsed via a window that is physically (m x n) large.
  6. The browser window can be zoomed in / out
  7. The browser window can be panned up/down + left right, while in the extents of the world's rect.

How should I go about implementing this? I'm especially concerned about the browser window. Can anyone recommend any good reads ?

This is not a homework - it's more of a task which I've set myself to complete.


Solution

  • http://web.archive.org/web/20100111062144/http://www.parallelrealities.co.uk/tutorials/