Secretly, you can write code in lua in config.lua to calculate those key variables.
XeduR has already explained using images as backgrounds, so to add an open answer, maybe you can also check if TileMap or Nine-Patch is something you’re interested in?