how to darken the entire screen except the player's surroundings

Hi guys, I have a question. Is it possible to protect the entire screen except for an area around the player? I would like to make a maze game, but I don't want the player to find the maze directly. That would make the game much easier and take away the fun. Can anyone help me? I tried, but I couldn't.
please translate your post into english, this is an english forum.

assuming that the title is all what you want, the simplest method is to make a picture of screen size, fill most of it with black and then have the center with increased transparency.

and then simply show picture
por favor traduza sua postagem para o inglês, este é um fórum em inglês.

supondo que o título seja tudo o que você quer, o método mais simples é criar uma imagem do tamanho da tela, preencher a maior parte dela com preto e então aumentar a transparência no centro.

e então simplesmente mostre a imagem
Desculpe, não percebi que tinha colado a parte em português e não a em inglês, mas já editei.

Não acho que o que você está dizendo resolva o problema
try a lighting plugin?
XP doesn't use plugins, and a script would be more complicated than necessary for this job.

Andar is right, you can do this using a Show Image event command and a few variables. There's a tutorial for it in the RMXP Tutorials section. Unfortunately, most of the event window image links are broken, but the text is still very informative and the images used to create the effect are still available! The tutorial is for a flashlight that can be turned on and off, which may be more complex than you had in mind, but it should get you moving in the right direction.

Pay special attention to this section--this is what makes sure that the light stays centered on the player!
Next is the fiddly bit which will make the image that appears on screen actually follow your character. Select Control Variables and then create two (2) separate variables - Player X and Player Y. For now, only use Player X. Have the Operation to be Set and then have the Operand to be the Character's Screen X. Be careful that it is definitely SCREEN and not MAP, otherwise it won't follow you, which is a common mistake. Repeat the process again, but change everything from X to Y.

Finally to add the flashlight image. Select Show Picture and set it to number two (2). Use the flashlight graphic you downloaded from here. Make sure that the Variable is set to Player X for X and Player Y for Y. This means that the image will be recognised as the one that is going to be following you about.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-darken-the-entire-screen-except-the-players-surroundings.173339/