Recently I've been trying to develop a 2D Terraria style game using SFML and c++. Everything has been working perfectly expect for the random terrain generation. Currently, I have a for loop that assigns the position and texture to an array of sprites (ex:int grass[150]) which are then drawn to the screen using a for loop. The terrain generates and looks okay but, the multiple arrays of sprites are being drawn to the screen every time my program loops. This is causing some serious performance issues, because currently around 1400 sprites (only a fraction of number of the amount I want when the game is finished) are being drawn every time my program loops.Recently I've been trying to develop a 2D Terra