Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Thank you :D.

The fog of war is just an additional layer between the layers representing the map etc. and the layer holding the HUD. It is initialized with black everywhere. I have the player's previous position (from the last frame / game iteration) stored as a class attribute. When the player moves, I draw a filled circle with half transparency (in the olc::PGE this would be olc::Pixel(0,0,0,128)) on the previous position and a circle with full tranparency at the player's current position. This gives the effect that previously explored areas are still visible, but not "active". Also with this method for each frame I just have to update two circles and not the whole screen, as this would be too computationally intensive. The gradient at the border of the fully visible area around the player is realized by a bunch of circles with different radi and transparency levels on top of each other. This last part is the most cost intensive but we just wanted to have it xD.

Then just give it another try ;) . With exactly the route showed in the window after the instructions and before the game itself starts you should have about a minute left at the end ;). But it really depends on where your ship is going, e.g. on which side of an island it passes etc.

(+1)

Thank you for explaining! That makes sense. I'll have to try drawing something like that myself,  the result is very nice looking.