The current inefficient version uses the following:

gamegrid: array[-tc..tc,-tc..tc] of TTile;

The starter tile is placed on [0,0] and since there are "tc+1" tiles in total I used this sollution, but of course this may be inefficient.

I don't really know if this actually takes up this much memory because most of these tiles will eternally remain NIL, so they shouldn't take up any memory, but on the other hand, the pointers may (not so well versed in computer memory usage).

tilelist: array[1..tc] of TTile;

This is the deck from which the player draws a tile each turn. Placing the tile simply lets the gamegrid point to this tile and then remove it from the tilelist.

The tile image is loaded from a BMP file and placed in a TBitmap within the TTile class. Each tile has it's own bitmap. This could mean I store the same bitmap twice, but on the other hand, the Tile can be rotated over a 90 degree angle so this would mean the TBitmap can turn out 4 different ways for each tile type.

I'm just wondering. Is this way truly inefficient. It could be acceptable because many items in the gamegrid are NIL.



About the suggestions:
- StringGrid in stead of DrawGrid:
I'm most comfortable storing the data in a seperate class. Maybe I'll make an OpenGL version later on. I don't know if it supports bumpmapping, but Making an extremely high bumpmap so cities and other buildings appear to have height would be cool. So I don't want to link to this grid.

- Hash table:
Don't know anything about hashtables yet, but I wouldn't mind learning a thing or two about that, so if it turns out to be the best option, I'll certainly put in the effort to use that.

- Pointer records:
This sounds like a good plan and kind of reminds me of Idea #2. I agree this would be the most memory friendly Idea, but what if I want to draw all tiles on a grid?

- Dynamic array:
In my screenshot you can see there are a lot of empty tiles in an array such as this one. Which brings me back to my question. Do nil pointers take up virtually no space?

The basic game has 72 tiles (one is placed by default, so 71 are left). In the worst case scenario the tiles could be placed in an L shape making it a grid size of 36x37 tiles. This would be a grid of 1332 tiles using the dynamic array. 1332-72 equals 1260 nil pointers.
Since carcassonne became more and more popular over the years lots of expansions have been made. With all current expansions added I don't think I would be surprised to get over 200 tiles in total (and trust me, the true fans play in this manor (imagine the complexity then)). I'm not even counting the unofficial expansions now.