This could well work although I believe it is a lot of overhead on the developer (me).
GDevelop has to render the scene anyway. Usually only the portion visible by the camera is rendered.
Now imagine you could zoom away until the whole scene fits the screen and take a screenshot to be kept in memory. If this screenshot allows some more operations as I mentioned above the topic could be closed in a generic way.
The performance penalty would be based on the speed of the machine and the idea of the developer. For my purpose it would be sufficient to create that screenshot at the beginning of the scene. When rendering that out I’d just add one point as player position, and optionally the mask resembling the fog of war.
That means in the game loop/render part there would be
- one image blit operation (show the map)
- one image blit operation (overlay the fog of war)
- one filled circle drawing (indicate the player position)
During the game loop/update part there would be
- one image blit operation (intensify the fog globally)
- one filled circle drawing (unfog player’s vicinity)
I’m not sure whether the camera can be zoomed out, but if that assumption holds true I believe this concept could be implemented as a generic extension.