Help With Lighting!

Is there any way, to make as my depth goes deeper the lighting to get darker? I am making a deep sea diving game and I need help to see if this could work. If it works in a few days I will provide a demo.

3 Likes

this extension can do it

here’s a very simple one that just darkens a lil bit every time you press a https://makecode.com/_azpiE1Cb61YM

4 Likes

You could use the color extension (It can be found in the default extensions) and set it so it applies the darken affect when you reach a certain point.
But I’m not sure if you can make it darker multiple times.

1 Like

Thank You So Much!!! That really helped and I have implemented it in my game. Thanks a lot!

1 Like

Also is there any way to store tile maps like saves then load it again in the same position afterwards?

2 Likes

The Settings extension lets you save data that isn’t lost when the simulator restarts. I know it is quite easy to grab the current tilemap data when coding in JavaScript, but with blocks I do not believe anyone has made an extension that gives you that ability.

The JavaScript code would be
game.currentScene().tilemap.data[‘data’]
That would be the actual raw Buffer containing which tile is on each square of the tilemap, and then you could create a tilemap with said data when you needed to.

2 Likes

Thanks, that helps! I will find a solution to this problem! Just wanted to know if it is possible.

1 Like