ScratchData LogoScratchData
Back to Camera_Plus's profile

Data Structures: Scratch Library for storing OBJECTS!

CACamera_Plus•Created April 12, 2022
Data Structures: Scratch Library for storing OBJECTS!
2
2
57 views
View on Scratch

Instructions

= A Fast & Minimal Scratch Library for Storing Objects = This library allows you to store dictionaries, also known as objects (a list of key-value pairs) in Scratch! You can even nest dictionaries inside other dictionaries using the dot.notation = HOW TO USE = Copy the sprite from this project to your backpack. The custom blocks for creating dictionaries, setting and getting keys, etc. are pretty self-explanatory. If you want to use them outside of the sprite, use the global variables and broadcast blocks, as shown in the example script in the stage. = WHY DO YOU NEED THIS = The default "list" data structure in Scratch is pretty limited, if you think about it. It only allows to store strings sequentially, without keys or nesting. In modern programming languages, there's another data structure - a dictionary, also known as an object. It provides an ability to create key-value pairs and store data more efficiently. Additionally, an ability to nest dictionaries allows for more complex data structures, such as trees, has tables, arrays of dictionaries, etc. = CREDITS = All of the code is written by me

Project Details

Project ID674972592
CreatedApril 12, 2022
Last ModifiedApril 12, 2022
SharedApril 12, 2022
Visibilityvisible
CommentsAllowed