2D World design question

Posted by Maciek on Stack Overflow See other posts from Stack Overflow or by Maciek
Published on 2009-10-19T19:12:06Z Indexed on 2010/05/03 14:38 UTC
Read the original article Hit count: 355

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.

© Stack Overflow or respective owner

Related posts about pseudocode

Related posts about game-development