Jump to content
Xtreme .Net Talk

KrunkSplein

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by KrunkSplein

  1. Got it all working. Thanks! [edited because I figured it out]
  2. I didn't really mean scrolling as in the map moves around the character, I mean it in the WarCraft 2 sense, where you'd move the mouse to the edge of the map or press a key and the view would scroll to whichever direction. Basically, relative to the map, the sprites stay still. Relative to the viewpoint, everything is moving.
  3. Working on a tile engine, and I was trying to implement scrolling. I'm going to have a 600x600 (arbitrary decision, may be changed) section of window devoted to displaying a map (the rest is for interface). My question is how would you implement scrolling in case the map went beyond 600 by 600? I was tinkering around and tried: mapDev.Transform.View = Matrix.Transform(offsetx, offsety,0) but that crashed my program. I've already implemented the code so that it doesn't render off-screen tiles, now I just need to be able to move the camera so that we can GET to the off-screen tiles. Also, I'm looking for a means to center the view if the map is smaller than 600 by 600, so that instead of being bunched up in the top left, it could look better. Though I have a suspicion that my two problems have one solution. Thanks in advance, Krunk
  4. I'm trying to teach myself some 2D in D3D basics (with the help of PentiumGuy!) and I've run into a problem for which I have no solution. The error is so rediculous that I can't even think of a nice way to describe it. A while loop, for all intents and purposes, is breaking for no reason whatsoever. Even when I specifically tell it not to. While(true) isn't working. There is no break; statement anywhere in the code. I'm a bit lost, and I could use any help I could get. The source is at http://umsis.miami.edu/~rgallo/Map.cs. I need me some help. Thanks in advance, Krunk EDIT: Found and fixed the problem. Just needed some fresh eyes. I had gotten the two indices of the two-dimentional array mixed up, and that was causing all sorts of confusion.
×
×
  • Create New...