We handled the resolutions on initialisation (we set a default based on Screen.mainScreen.bounds.height and allowed users to override it in settings but that requires the application be restarted). We then have three resolutions for every graphic asset in the game which sounds like a pain but most of it we automated with photoshop actions
As for the tiles, that’s a little hairy. I wish I still had the function we wrote to determine which block goes where but we condensed it down to a lookup table a long time ago (it’s something we worked on for the highlight outline of blocks in this old xna game years ago) but that doesn’t stop you using our implementation!
Basically we count the blocks around the tile and use a little binary math to generate a unique value for every possible outcome.
So for every tile we do this:
var x: int;
var y: int;
var tileBitmask: int = 0;
// Iterate over a 3x3 matrix of tiles around placed tile
var i: int = 0;
for (y = -1; y < 2; y++) {
for (x = -1; x < 2; x++) {
// Skip placed tile
if (x == 0 && y == 0 ) {
continue;
}
// If tile there, add relevant bit
if (grid.getTile(xPos + x, yPos + y)) {
tileBitmask += (1 << i);
}
i++;
}
}
// see link below for this lookup table (it's 256 lines long!)
return bitmaskToIndex[tileBitmask];
and that should give us a value between 0 and 255 (8 surrounding blocks, 8 bits) which we can lookup in this giant bitmask index (that’s the bit I wish we could remember! I just know it spanned several pages of gibberish notes!) which should correspond to a tile ID. Your tiles will have to be in the same order as the one linked in the reddit post - I can go in to more detail about that when I get home if you’d like (I’m at work at the mo)
Hope that’s helpful