Discuss Scratch

Monniasza_spzoo
Scratcher
100+ posts

Categorize variables

It will categorization of variables and lists e.g.

Lists
Nodes
  • node x
  • node y
  • snap x
  • snap y
  • snap occupied
  • free snaps
  • unused snaps
  • x offsets
  • y offsets
  • targets
  • holders

Variables
Physics
  • x accel
  • y accel
  • z accel
  • yaw speed
  • pitch speed
  • roll speed
  • x speed
  • y speed
  • z speed
WindOctahedron
Scratcher
500+ posts

Categorize variables

Do you mean this?
You have, for example, 20 variables in a project. 8 of them are your stats, 8 of them are opponent's stats, and the other two are used to keep track of whose turn it is and how many turns have already been played. You'll create three categories: “player stats”, “opponent stats”, and “other”, and they will be somehow separated to make them easier to find.

Last edited by WindOctahedron (Aug. 20, 2019 10:23:53)

Monniasza_spzoo
Scratcher
100+ posts

Categorize variables

WindOctahedron wrote:

Do you mean this?
You have, for example, 20 variables in a project. 8 of them are your stats, 8 of them are opponent's stats, and the other two are used to keep track of whose turn it is and how many turns have already been played. You'll create three categories: “player stats”, “opponent stats”, and “other”, and they will be somehow separated to make them easier to find.
I mean this.
Monniasza_spzoo
Scratcher
100+ posts

Categorize variables

Lists
  • PartsPart parents

Variables

Nested lists
  • Parts
  • All Parts
  • Part Children
    UnconstructivePoster
    New to Scratch
    100+ posts

    Categorize variables

    Support, this could help make variables more organized.

    A lot of variables in a project could make it harder to sort through them, and something like this could really help make things easier. (Personally, I use a system of “tags” where I put a bracketed letter (like "[P]“ for ”player") at the beginning of a variable name to note what category it belongs to.)

    No signature currently stored in profile.
    Monniasza_spzoo
    Scratcher
    100+ posts

    Categorize variables

    UnconstructivePoster wrote:

    Support, this could help make variables more organized.

    A lot of variables in a project could make it harder to sort through them, and something like this could really help make things easier. (Personally, I use a system of “tags” where I put a bracketed letter (like "[P]“ for ”player") at the beginning of a variable name to note what category it belongs to.)
    I still use tags and variables are still badly organized.
    It should include hash-nested lists, treemaps, hashtables, nested lists and regular lists.

    Last edited by Monniasza_spzoo (Aug. 21, 2019 14:02:02)

    groko13
    Scratcher
    100+ posts

    Categorize variables

    Absolutely support. Any project that is complex enough contains a large number of variables, and categories would clean them up and make it easier to see what each of the variables is doing.

    define (kumquat)
    say [A kumquat is a small, orange, evil fruit]
    say [It ate the rest of this signature. Sorry.]
    kChiaEC19
    Scratcher
    100+ posts

    Categorize variables

    Workaround: Create comments in a tutorial sprite to explain what each variable in custom blocks and blocks do.
    Pros: Able to easily sort variables out.
    Cons: Because of the way variables are made, this will break all projects, both unshared and shared, because of the way variables are already stored in the project.json file inside the .sb3 file (you must change it to .zip first to access it)

    Last edited by kChiaEC19 (Nov. 10, 2019 20:28:52)


    kChiaEC19 (Sorry, cannot get the entire colour of the link rather than just the underline to change on hover)

    Scratcher
    100+ posts

    Powered by DjangoBB

    Standard | Mobile