Hi!
I'm studying C# and I'm currently a novice.
My problem is what is the best way to build my 2d map, it will be a random dungeon map.
My first thought is to make a structure, and then make a two dimensional array making each element of the 2d array point to a copy of that structure. Is that possible
Each "Tile" will contain a lot of info, and very often those values need to change, like when picking up an item on that tile, or a monster moves from that tile to another etc.
I have to make som clever programming to build this map from those classes.
Maybe the best way is just to build structures or just to build classes
Can someone point me too a good way to start with this one, even better, some code to look at

Engine for a 2d map
Sanjay G
Array of structures is ok while your structures are small (<16 bytes). Classes are more useful in most cases.
Can you describe all information you have on cell (tile) & it's usage
In fact I think it may be more useful to not even use matrix, but use multiple lists. For example, you have level of 1000 x 1000 cells (1 million cells) and you have food on cells (300 food items) - then making list of food items will be array of 300 points (X;Y), not 1 million nullable links to food description. This is good for memory saving (less memory used, more chance all will be in CPU L2 cache - approximately 20-30 times faster than reading from memory). But this is not good if you must search at cell X;Y for food - must iterate 300 items, instead checking only one.
As you see from previous example - you must think about 2 things: 1) how much memory it will take and 2) how & how often you need to access this data. Perhabs some mix of both approaches is good.
One more thing, is how your map must be stored - you may use matrix (good in general, but require more memory) or you may use lists of objects with coordinates. Here is sample of matrix - each cell can have wall or have no wall in it, i.e. player can pass or can't pass it. Pros: easy to use, easier AI. Cons: heavy memory usage, unable to make diagonal walls. Another way is to define each wall with line (X1;Y2;X2;Y2) and implement collision detection logic, each object can be rect or ellipse on this map. Pros: very large worlds can be made, generally more optimized memory usage, better geometry support. Cons: much harder to implement most logic.