How to scroll a tile map (C# with Directx)
Banned - Reputation: 161
Posted 26 October 2012 - 09:00 AM
Tilemaps can be done in many ways, so I'll keep this as general as possible: When tiles are initially positioned, a simple Vector2 can be subtracted from the tile's drawing position, and in effect making the map scroll. By repositioning the tile's drawing position instead of the base location, any collision math you have can be preserved. If your particular programming language doesn't support Vector2 objects, just use X and Y values.
Edited by MisterFuzzy, 04 November 2012 - 01:07 PM.
"Only idiots quote themselves" - MisterFuzzy
Prime Members - Reputation: 869
Posted 26 October 2012 - 09:23 AM
I wrote the original post in haste. Edited for clarity.