Illuminating parts of scene as actor moves


  • Posts: 1
I want to create a game where only a section of the scene is visible around the actor. As the actor moves forward more of the scene becomes visible. So, its as if an explorer is walking through an unknown area that is dark. As they travel, it becomes illuminated and known.

How could I do that?


  • Posts: 216
I think you can use the image API for this, although i don't know how to use it, but if you look for the tutorials for it i think that it could answer your question.
Last version (0.1.5) of my now cancelled game:


  • *
  • Posts: 2738
A simple approach would be to have a grid of black tiles drawn on the top layer. As the player enters each tile, the "dark tile" is removed. It would be fairly quick to implement, but you wouldn't get a continuous illumination this way.

I'm not sure how frequently you can update an image with the image API. One way I can think of to use it would be to have an invisible, black circle that is the player's "light" following them around. Begin the scene with a black image "shadow" drawn over the top layer. Periodically, use the "clear image using <>" block with the black circle to mask out part of the shadow.


  • Posts: 2068
I believe sunrise kingdom once did a tutorial on lighting effects. Try googleing for that.
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p