Discuss Scratch

gatzke
Scratcher
100+ posts

Matrices / 2D arrays?

I did write some quick and dirty basic matrix operations. Poorly tested and poorly implemented, but you get what you pay for. No error checking, no error control, not much of anything. Good luck! It appears to work a bit for some simple 2x2 problems.


https://scratch.mit.edu/projects/24145965/

Jonathan50
Scratcher
1000+ posts

Matrices / 2D arrays?

gatzke wrote:

I will try to work within the bounds they have provided for me :-(
In retrospect…
JuicyChickenFlesh
Scratcher
5 posts

Matrices / 2D arrays?

Could you possibly use clones to make an array?

I used to think it was a useless feature to have variables and lists specific to sprites until I learned that the variable carries for clones, and can be changed afterwards without changing the variable of the clones. It's mentioned in this article.

https://en.scratch-wiki.info/wiki/Advanced_Clone_Usage

The thing is, there are also these “local” versions of variables for lists. Maybe we can make each clones check what list number it is when called to create a two dimensional list? We would have to make clones that only existed as data sets, but maybe it can be done.

Powered by DjangoBB