Unlike the last week, I have spent most of my time programming and fixing bugs. On thing interesting is that I was using threads and more than two for a point and click game it’s can be seen as premature optimisation. There is not enough memory to load all the maps of the game so I have a pool of loaded maps and each time the user want to move I load the map if unloaded. I can also load all the maps adjacent in another thread but the pool will be full quite fast. SDL need to have one thread where all the rendering is done, SDL_Texture cannot be in multiple threads without context sharing and in this case, it’s not worth it. You can load SDL_Surface in another thread with SDL_image because SDL_Surface reside in the CPU and not GPU. So you can make a loading screen with two threads without problems, I am writing a tutorial on that. Other optimizations are for example texture atlas, I am using textures atlas for inventories icons and menus and animations. At the end I should use it for everything that needs to be loaded at the beginning of the game, the size of the texture atlas will be 2048*2048. But for the moment, texture atlases can be annoying because they have to be generated in the tiles editor each time I add a new image.
Other optimizations are for example texture atlas, I am using textures atlas for inventories icons and menus and animations. At the end I should use it for everything that needs to be loaded at the beginning of the game, the size of the texture atlas will be 2048*2048. But for the moment, texture atlases can be annoying because they have to be generated in the tiles editor each time I add a new image.
I always spent a lot of time thinking about design or optimizations on things that does not need to be optimised. I think I don’t like the idea of not doing the best things to save time, I prefer doing the best thing every time worth it or not, the problem with that is the time available to work full time on this game is limited: 18 months so I cannot fool around too much if I want the game to be finished in time.