I’ve actually started working on something.  The last couple of days I have started work on a Map Editor for an undefined game, or game type, hence going against all principles of game design and development.  All that is defined at this stage is that it will be a 2D environment.

The editor allows complete camera control (rotation, translation and zoom) based partly on the Tiled Sprites Sample over at Creators.XNA.Com website.  That all works properly.  I have a collsion grid in place too, and it’s there that I have the problem.

I cannot manage to deduce the co-ordinates of the mouse in world space when positioned over the grid (or indeed any object in the scene).  Viewport.Unproject doesn’t seem to work, and probably isn’t meant to as there are no ‘real’ 3D projection/world matrices in play with this scenario.

Taking into account only translation in X and Y, I can retrieve the co-ordinates just fine, but any change in scale (camera zoom) causes problems.

So work on the editor is now on hold until I can find some help to get this issue resolved.

Share and Enjoy:
  • DotNetKicks
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • Technorati

Tagged with:

Filed under: Game Design

Like this post? Subscribe to my RSS feed and get loads more!