Though you are very likely to know fish, for anyone else reading this topic (working on 2d zelda games): Lttp had a similar combined-tile system as Fish has used above in his Diablo-like engine:
ie the tile maps were [64*64] arrays of words (snes->2 bytes), each representing a unique 16*16 tile.
Each word was the index of that 16*16 tile in a list of 16*16 'virtual tiles';
Each 16*16 'virtual tile' was an array of four 8*8 tile indices;
Each 8*8 tile index is indexing an 8*8 image of the frame of that number in the image of all the tiles.
- This was only in the overworld.
[edit Trying to explain better ]:
64*64 words, each displaying a 16*16 tile;
Each of these words was an index in an array of 'virtual 16*16 tiles'.
Each virtual 16*16 tile in the array, was an array of 8*8 tile indices.
Each 8*8 tile index was the frame of that tile in the tile image (made up of 8*8 tiles)
[/edit]
....................................................................................................
Anyway, working with an 8*8 tileset is rather over-tedious, so this system would make it easier to produce the maps (though the purpose in zelda was to save memory) by hving larger 16*16 tiles to work with in a map editor.
You could work with, ie in a map editor even larger tiles still through, eg: 32*32, just to make it even easier to work with. You could even have various shaped tiles, that are pasted onto the tile map as 16*16 tiles/virtual tiles. IE the tilemap is stored as 16*16 tiles, but the tiles you select and paste can be used as if either 16*16, 32*32 etc.
- Though a map making system isnt specifically the subject of the topic, ill hope its relevant enough to discuss in this topic
.
However the larger the tiles get, the more tiles that would have to be searched through when changing which tile type is being used in pasting onto the map, so a balance should be reached between the tilemaps tile count, and the domain tiles (Just what i call the ones being referenced: Domain-[Map]->Codomain..So Map is mapping from domain..So those tiles are the domain tiles).
It also depends on the type of game, which makes making a very general map editor more difficult eg: Fish's Game is very much suited to having much larger tiles like he used, wheras a zelda game would need the ability of working with 16*16 tiles at some stage.
....................................................................................................
Anyway, when getting down to having lots of larger 'domain' tiles in the map editor: There is a map which maps the initial tile image to those 'usable domain tiles' (eg: 16*16 tile
- is composed of four 8*8 tiles {0,34,5,7} in clockwise or w/e). But they could also be organised into groups, so when looking for a tile, change the group and select from a smaller group of tiles: they would all still be mapped from the same tile image, just it would make it much easier to search through.
// By 'usable domain tiles' i mean the largest tiles to select and paste onto the tilemap.
And, if these 'useable domain tiles' are 'pasted' onto the tilemap as 8*8 or 16*16 tiles (indexing the domain tiles), rather than the tilemap storing indices of 32*32 or 64*64 indices from the groups, then the 'usable domain tiles' could have as much redundancy and spacing as you'd want with no loss to the games performance/efficiency, making it much easier to make maps. There could even be multiple objects of the same type in different groups, so that eg: Tree could exist in both the forest group, and overworld group, while still referencing the same tiles.
Misc pop-in ideas
{
Additionally, it would be great to be able to select many tiles from the usable domain tiles,
and paste them onto the tilemap as a rectangular or mutiple (holding Ctrl) selection of tiles.
Would even be good to have multiple layered useable domain tiles, that paste the multiple
tiles onto their respective layer on the tilemap, eg: Say you had a tree tile, with a green
tile on one layer and a tree-top tile on a 'cover' layer. Though often you'd just have one
tile for this anyway, with a composite meaning so...
}
....................................................................................................
The final sort of plan that this sums to for me (Hopefully you can see the evolution of this plan out of the previous crap), is to, eg: have an extra tab next to 'Tiles|Objects' in Davjos tile editor there.
Lets call this tab 'Groups'.
When in the group tab, the user could load different 'grouping' scripts. These wouldnt have to be made as scripts though: they could be made in the editor.
In the groups tab would be displayed a grid of tiles, their values stored in the grouping tile-index array, each tiles index being that of a frame in the image shown in the 'Tiles' tab.
The groupings in the script would be a list of the rectangles on the grouping tile-index array that could be selected and pasted onto the tile map. Each grouping could be assigned a name.
So eg: "tree" 10,5,14,10; "bush" 3,2,4,3; - if end-grid position is a terminator, or "tree" 10,5,13,9; "bush" 3,2,3,2; - if end-grid position is inclusive, depending on the way you want to store the rectangle.
The user could make this grouping script automatically in the program by pasting tiles from 'Tiles' or from the tilemap onto 'Groups' (this would imply that the Groups wouldnt in fact be on a tab system next to 'Tiles' And 'Objects' to allow transfer between. And then, selecting a rectangle of tiles in the group with a ''prepare-grouping' tool (only rectangular boundaries that hadnt already been assigned may be selected from), and pressing a 'group together' button (Or Ctrl+g lol). A text field would contain the name that would be assigned to this new grouping, and as the mouse hovers over the context focused by selection of the 'groups' tab, a tool-tip would display the name (though i personally hate tool tips...They get in the way more often than they help, and decide not to show when you really need them => option to turn them off: The tool tips showing function prototypes in DevC++ are an absolute pain!).
The groupings script would also contain the map from the tile images frames to the grouping tile-index array, in a similar format to that of the pixels of an XBitmap (ie as a C implicit array aggragate of literals).
Each group script would also have a 'friendly-name' (or just use the name withought path), and under the context below the 'groups' tab would be (next to the New Group Name text field) a menu box with an arrow to pull down and select from among a list of the most recent group scripts, only unlike most recent file menus with the whole path, this would show just the name/'friendly-name', for ease of use, under the (absoultely non-critical) assumption that the groupings would be stored in the same folder and have different names as they would be used for the one tile mapping project. (Further, there could be settings specific to different 'projects', and the list of recent groupings would be defined seperately for each project, though importing is obviously something to implement.
Something else..I cant remmember.
Any of that make sense? lol