News for hackers. Stuff that matters.
Re:My first game with Carimbo, my homemade engine by delduca on Tuesday October 08, 2024 @01:43PM (#41779863)
The prefetching works like this: a list of assets is provided, and in each main loop iteration, the engine opens and loads a single one into memory (an unordered map of shared pointers). It would be more effective in a longer game, where as the player moves, the assets are already being prepared for use.

There’s also a mechanism to collect and remove unused assets from memory.

Re:My first game with Carimbo, my homemade engine by delduca on Tuesday October 08, 2024 @01:48PM (#41779919)
What I really wanted was to load the textures in a separate thread, but 10 years ago, when I tried it, I didn’t get good results. Maybe now things are different.