In this popup there is an image, and that image is not inside the memory/use inside the running game.
And maybe the player never going to see / use this popup (image).
I don't like the idea to put all images into the memory, when not needed.
So I did something like:
If open popup then do love.graphics.newImage()
If close popup then destroy the image (clean up).
But now I see a glitch when loading a newImage when the game is already running.
This is because this image loading is on the main thread.
So I though, well, let's check if we can use another thread for loading images.
- https://github.com/kikito/love-loader (old code, don't know if still oke)
- https://love2d.org/wiki/love.thread
So I guess I can make it work (I guess), but the wiki say that there are several restrictions.The love.graphics, love.window, love.joystick, love.keyboard, love.mouse, and love.touch modules have several restrictions and therefore can only be used in the main thread.
Questions:
1. Is is oke to load some images into the memory with a thread?
2. Is there another way (without a loading screen) to do this?
Thanks for the information.
Martijn