   2d Zooming Camera - XNA
  Hi, so in the past what i would do, is (Its a tile rpg game);Just alter the tile size value to 'zoom'. That is expand everything, i would then compensate the natural zooming into the top left corner, by altering the master x and y positions relative to where the mouse was pointed on the screen. The result was almost passable, but messy.I am after a much cleaner technique. Can anyone help me here? I just wonder if there was a nice clean and simple way of doing it, since i don't know xna too well there could be some great built in solution.   
  I made it easier on myself, rather than have a smooth zoom, i settled for 2 versions of zoom. 1, standard size tiles, 2, double sized. This way i could control all the details just by getting the current zoom setting and modifying the values like x/y positions and width/height by the zoom setting. Easy peasy.   ;  I have a question though about 2d games. I've been using integers to hold screen and or map positions, speed, things like that. I heard Vector2's are the way to go, is this right? Can someone elaborate on the subject?   ;I have a question though about 2d games. I've been using integers to hold screen and or map positions, speed, things like that. I heard Vector2's are the way to go, is this right? Can someone elaborate on the subject?Generally you want to:1. Use floating-point types rather than integer types, unless you're really doing something that only requires integer values2. Use a user-defined 'vector' type rather than e.g. individual 'x' and 'y' variablesIf you're working with a rendering API that expects integer values, you can convert the floating-point values to integers as needed before sending them to the API (e.g. for specifying the position at which to render a sprite).   ;  another clarification on using vector2 or vector3 instead of individual values. It makes things cleaner to look at, and saves on alot of code writing. take for example, changeing the position of a point./** Individual way. *//** your point represented by x, y, and z */float x = 0;float y = 0;float z = 0;/** the distance you want to move your point, represented as velocity in each direction. */float velX = 10;float velY = 0;float velZ = 0;/** now to move the point. */x += velX;y += velY;z += velZ;/** using vector types. *//** your point. */vector3 point(0, 0, 0);/** the distance you want to move. */vector3 velocity(10, 0, 0);/** now to move the point. */point += velocity;As you start to get more and more math intensive, dealing with vectors will make alot more sense, and be alot cleaner to look at.Also take for example my old draw call, fro mbefore my last refactor.DrawQuad(list, x, y, z, width, height, sprite, rotation, originx, originy, color);using vectors it now looks likeDrawQuad(list, position, size, sprite, rotation, color);It saves alot of time writing the code, and when I'm toying around with positions and so forth, it makes editing a hell of a lot easier on me.   ;  Nice! Yeah ive been lying awake thinking about Vectors and cant sleep because im so excited haha. Im assuming building a camera with smooth zooming, rotation of map etc, will be fairly simple using vectors and matrices? I guess it's a bit of a leap for the newb to see what's used in 3d being applied to 2d, but then the functionality is all there right?Thanks for your replies!   