I figured out how to make a 1 dimensional array, but I couldn't figure out how to read it. Then both a good and a bad thing happened. I stumbled upon this project. That is good because now I know how to write, but it's bad, because it was already done before. However, my version is more simplified. (As in you can only give new values, or erase the whole array.) During the development of it, I realized that scratch gives a limit on size. So I'm gonna be working around that with multiple arrays.
also, hadn't you recently posted a rotating 3-d image rendering program? I was telling you how to fix the pen flicker, when it suddenly said sorry invalid request.
ok now I am fully confused :) downloading did not help me understand lol! could you please explain in simple terms how it works? I think my brain died from script overload (^_^)
yeah I just did that, also in this project the upper limit is 10 digits (5 2-dig. numbers, 3 3-dig. numbers, etc.). But as soon as I fix the bug, the limit will skyrocket to 304 digits!
One variable is storing multiple digits through clever use of the Mod and 10^ functions. This has made the code really complicated; I can barely understand it, and I wrote it =P
Here's a (simplified) example of how this uses the Mod and 10^ functions. Let's say you have an array 3458, and you want to break it up into the 2-digit numbers 34 and 58. To get the 58, you would use 3458 Mod (10^2). It uses 10^2 because you want 2 digits, and 10^2 is 100. Then subtract 58 from 3458 to get 3400, and divide 3400 by 100 to get 34. Now you have 34 and 58!
This is a proof-of-concept demo of my infinite array system. The system doesn't work as well as I want it to; it only supports arrays up to 10-digits properly, while I want it to support up to 305 as intended, but it's still good for what it is. If you use arrays over 10 digits, the reading function and setting function won't work.
Comments
You need to be logged in to post comments
Add a Comment
I figured out how to make a 1 dimensional array, but I couldn't figure out how to read it. Then both a good and a bad thing happened. I stumbled upon this project. That is good because now I know how to write, but it's bad, because it was already done before. However, my version is more simplified. (As in you can only give new values, or erase the whole array.) During the development of it, I realized that scratch gives a limit on size. So I'm gonna be working around that with multiple arrays.
(view all replies)Comment Reply
Come to think of it, I could make a 3D array using their sizes....
(view all replies)Comment Reply
Cool! I'm thinking of trying a 2D array based on the positions of hidden sprites...has anyone tried that yet?
(view all replies)Comment Reply
my X-array is a square??? I know the side over eight means infinity bu a square?
(view all replies)Comment Reply
also, hadn't you recently posted a rotating 3-d image rendering program? I was telling you how to fix the pen flicker, when it suddenly said sorry invalid request.
(view all replies)Comment Reply
ok now I am fully confused :) downloading did not help me understand lol! could you please explain in simple terms how it works? I think my brain died from script overload (^_^)
(view all replies)Comment Reply
yeah I just did that, also in this project the upper limit is 10 digits (5 2-dig. numbers, 3 3-dig. numbers, etc.). But as soon as I fix the bug, the limit will skyrocket to 304 digits!
(view all replies)Comment Reply
also, are you using a variable to store or the screen? I have a basic pen-based array, here is a link: (link to project)
(view all replies)Comment Reply
I'm using the X_Array variable.
(view all replies)Comment Reply
One variable is storing multiple digits through clever use of the Mod and 10^ functions. This has made the code really complicated; I can barely understand it, and I wrote it =P
(view all replies)Comment Reply
Here's a (simplified) example of how this uses the Mod and 10^ functions. Let's say you have an array 3458, and you want to break it up into the 2-digit numbers 34 and 58. To get the 58, you would use 3458 Mod (10^2). It uses 10^2 because you want 2 digits, and 10^2 is 100. Then subtract 58 from 3458 to get 3400, and divide 3400 by 100 to get 34. Now you have 34 and 58!
(view all replies)Comment Reply
clever! please let me know when you are done, because I really need arrays for a project of mine.....
(view all replies)Comment Reply