2

I have a task to represent data in the form of tiles. Here is an example data:

WWWWWWWWWWWWWWWWWDWWWWW
WCCCCCCCCCCCCCCCGGGGGGW
DCCCCCCCCCCCCCCSSdGGGGW
WCCCCCCCCCCCCCCSSSdddGW
WWWWWWWWWWWWWWWWWDWWWWW
WCCCCCCCCCCWCCCCCCCCCCW
WCCCCCCCCCCWCCCCCCCCCCW
DCCCCCCCCCCWCCCCCCCCCCW
WCCCCCCCCCCWCCCCCCCCCCW
WWWWWWWWWWWWWWWWWWWWWWW

Legend:

  • W = wall
  • D = Door
  • C = Carpet
  • S = Sand
  • d = Dirt
  • G = Grass

I'm trying to represent this in an application. If I take a grid of such data, say 300x300, and decide on a fixed size that represents an object, the resulting map will be massive and require quite a lot of scrolling.

Putting aside the later requirements of painting painting blocks of object and what not, I mainly trying to get a smooth fast scrolling and basic editing on each object. I'm a WinForm developer and don't know if it'll be a good idea to do this in WinForm. WPF comes to mind as it's more like a free roam application instead of the rigid WinForms.

Any suggestions please.

DoomerDGR8
  • 4,840
  • 6
  • 43
  • 91

1 Answers1

2

For a 80s-inspired look, You may want to look into isometric projection, Hassan. It works very nicely with 2D-mapped information.

Basically, you define graphic content following a faux-isometric perspective grid, where the content may represent floor tiles, such as these:

enter image description here

You may then parse your data maps into surface tiles, which may even represent structures (walls, in your case):

enter image description here

This is an example of a fully-implemented isometric (2.5D) room projection:

enter image description here
(source: pixelcurse.com)

You may want to use an isometric engine in order to help you with data visualization (there's quite a few of them), or build your own. Some resources follows:

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
OnoSendai
  • 3,960
  • 2
  • 22
  • 46
  • 1
    While this might be slightly overkill, it does look nice, and I've always been a fan of this style. His data may be too simple to handle the directional component, in which case he should probably just do regular square tiles. – Magus Jan 17 '14 at 17:09
  • Data is simple + the there is no `y` axis. I love this though. There is the occasional part where there is a carpet under the door – DoomerDGR8 Jan 17 '14 at 17:56
  • Actually, there's no extra axis as well on that representation, @HassanGulzar - it only looks that way because the tile itself may have a 'height' parameter associated to it (floor: 0px tall, wall: 100px tall, for example). And Carpeted Door may have a different symbol (say, [P]); you just need to proper interpret and render it. – OnoSendai Jan 17 '14 at 18:19
  • You're correct, @Magus, but I must confess I picked that sample image because it was a very neat way to represent the 2.5D concept. ;) – OnoSendai Jan 17 '14 at 18:21
  • 1
    Another possibility would be a layered concept. Particularly in a game constrained to a grid, you might have a boolean pathing map which determines which objects are passable. For a more complicated example like above, you might go for a three layer approach, with a pathing, terrain, and object layer, which would make open/closed states for doors easier. Ultimately it's a matter of determining the goal, however. – Magus Jan 17 '14 at 18:35
  • Still trying to figure out what works best. The tile-map I'm trying to represent is one from RimWorld. I'm construction from the save file. I've a lot of time and code in following the XNA path. But for Visual Studio 2013, there was indirect support plus it invokes GFX. I'm looking for a winform way to do it and at worst case, WPF – DoomerDGR8 Feb 02 '14 at 10:06