i´m pretty new on both c++ and SDL, completely self educated so bare with me. I´m not quite sure what to google so I was hoping for some help here.
Im doing a civilization type game. With a random generated map made out of
SDL_Rect Board_Grid[board_x][board_y]; which is about 60x140 cells randomly generated (water, ice, subartic, temperate, tropic, mountains, coastlines etc). each with its corresponding texture. It works very well.
But my idea was that since most tiles, or cells, wont change during the game. I would like to, after the map is generated, copy each tile on the board to a single rect/texture covering the entire map. So i dont have to calculate each tile every loop. Much like how i copy a portion of a .png sprite sheet using IMG_Load to a rect. That would make thousands of textures in to just one big. and then put everything moving on top.
So each loop starts with putting the big world texture in the first, and then put players/trees/things on top.
I’ve been programming for a couple of hours now and my brain is a little bit melted, but i hope someone understands what im after. And what your comments are about the idea