[Extension] BetterSettings - Save booleans, images and string arrays!

Since I am writing this on Sunday, happy Easter everyone! :hatching_chick::rabbit2:


Recently I promised to release a new extension by the end of the week. Technically, I released it on my GitHub, but you’re most likely reading this on monday, because of the forum approval process.

Introducing: BetterSettings!


BetterSettings is an extension I’ve waited for for a long time. Simply adding more datatypes to the settings namespace shouldn’t be that hard, right?

Well, nobody did it, so I had no choice.

You can now save new datatypes to device storage.
The datatypes currently supported include:

  • String arrays
  • Booleans
  • Images
  • Boolean arrays

The datatypes I’m considering at the moment include:

  • Image arrays
  • Nested arrays (eg. number[][]...)
  • Tilemaps
  • Objects

…and more!

It’s important to note that the BetterSettings extension is just an addon to the standard BlockSettings extension, which means you’ll still be getting all of your standard blocks. You can also migrate to BetterSettings even if you have older projects with the settings extension installed.

Available Blocks


This extension adds 8 new blocks to the BetterSettings category. (Replaces Settings if existent).
General datatypes
[W/R boolean, W/R image]

General

Here you can access standard datatypes such as booleans and images. I’m planning to expand on this in the future with some of the datatypes named above.

Arrays
[W/R string[], W/R boolean[]]

Here you can access array datatypes. Along with the standard number arrays, the string and boolean arrays are now available. In the future, image arrays and nested arrays are planned.

Feel free to use this extension, no creds required. If you found this useful, leave a reply or like, and if you have any questions/suggestions related to datatypes or operations, make sure to reach out below. Cheers!

(Repo/extension link)

8 Likes

THANK YOU SO MUCH THIS IS A LIFESAVER AHHHHH!
Thank you so much this is a lifesaver ahhh!!!

1 Like

This is AWESOME! This is gonna be really helpful for me!
The extension GitHub link seems to be for the Declutter extension though.

Very cool!

1 Like

YESSSSSSSS!!! I’VE BEEN WAITING FOR THIS!!! :crazy_face:

2 Likes

Ummmmmmmmmmmmmmmmmm I would love to use this extension… but don’t know how… can you save a game with this? (like have game files and stuff?)

Oh damn, thanks for noticing! I must have mistakenly put that one.
Here’s the real link, since I can’t edit the post anymore

3 Likes

You can save individual values using ‘keys’, kind of like setting permanent variables that are saved to the device. It’s something that’s been available for a long time on MakeCode, but this extension just improves on the functionality of that feature by adding more datatypes.

2 Likes

Great! I can’t wait to use this!

2 Likes

No lie I was making something just like this! This is really cool though. Definitely very useful, that’s for sure.

1 Like

Being able to save tilemaps would be super helpful for games like @Maketendo’s MakeCode Builder!

3 Likes

Well, tiles are really just images, and tilemaps are 2 dimensional arrays of images. Considering I’m already planning to implement image arrays, tilemaps should be pretty straight forward.

4 Likes

Please make tilemaps saveable!
I have had games before that would have been next level with this functionality!
For example, I made a farming game where you hoed, planted, watered, and upgraded your farm, but I tried to make it possible to save your farm after a reset, which wouldn’t work. tilemap saves would be fantastic!

2 Likes

Are you going to store each pixel of every tile’s image or is it a 2D array of tile IDs?

3 Likes

The idea is to assign every unique tile to a number, and then essentially store a map of those numbers, according to the tilemap.
That’s way more efficient than storing every image over and over again for every time they appear in the tilemap.

2 Likes

Whoops, looks like I didn’t read your post properly, I must have missed this. Yeah, that’s basically what I said in my other reply

2 Likes

Hey @Sarge! By any chance, did you get around to working on the support for image arrays?

3 Likes

Yeah I’ve kind of thrown this on the backburner (like every other project lol) but thanks for reminding me, since this is a very straight forward feature to add!

1 Like

I’ve done it! Image arrays are now available as a part of the extension. I also fixed string arrays, since they were broken. (somehow it was not reported by anyone)

3 Likes