divided rendering into two layers: first background, second characters