title: How to properly generate random terrain in SFML using c++
body: <p>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.</p>
  
  <p>So, my question to you is how do I make my terrain generate efficiently? Is there a way to only clear a portion of the sprites on the screen at a time or only clear sprite when it is modified? Is there a better way to create terrain other than using multiple arrays of sprites?</p>