Making a project without using the "variables" section

Boredom is taking over my brain, so I am challenging myself to create a project without using the variables section. I don't really know what type of project to make, though. Does anybody have any suggestions?

idk, but anyone can just (As of snap 10.0.0)

But you are gonna need the variable itself, and you can't edit it to make it part of motion (or any other category).

Also, this is all that happens when I do that:


look in the block palette for motion, I made a new block, not editing an old one. (drag these blocks into snap to get them)

How in the-

Oh wait, you literally just made a new block and dragged the definition of the variable blocks into the new block you made, basically creating a duplicate of that block, except you made the custom block a motion block.

Then I should elaborate more on my challenge. The new challenge is this: I want to make a project without using the variables section, nor should I make any custom blocks using the same primitives as any of the blocks in the variables section. No empty costumes or empty sounds are allowed. No sprites that don't have a big impact on the project are allowed.

So are you looking for hard to make projects or easy or mid?

right, but the variable getter block doesn't even use that. I could make the set block in the same way as I did the variable getter and script vars block.
Also, how about this?


(check the definitions, they are very, very different).

Are you trolling? They're clearly asking for a project that somehow does not use variables in any way

It doesn't really matter the difficulty

Although it is slightly annoying, I still think it is comical how @sathvikrias keeps finding ways to work around using the variables section.

Also (to sathvikrias), this happens when you put in a list:
untitled script pic (3)

This happens when you put in a Boolean:
untitled script pic (4)
which is different from:
untitled script pic (5)

The custom block you made also has difficulty reporting when you run this script:
untitled script pic (6)

Also, a new rule: No making custom blocks (so @sathvikrias can't find new ways to work around not being able to use the variables section).

This is, imho, throwing out the baby with the bathwater. The whole point of Snap! is that you can Build Your Own Blocks. A better rule, if you need a rule, would be not to use the PRIMITIVE block (or JS Function either).

Do you want to rule out procedure inputs? They're variables, but they don't live in the Variables palette; they live inside your procedure definition. You can (it says here) program any algorithm without global variables, and without SET. This is the core idea of functional programming.

untitled script pic (10)

If I rule out only primitives in custom block making, then that allows custom blocks like this:


When I made that rule, I couldn't think of a better way to word it, so I just stated it like that. Now that I have the time to think of some better wording, I will change that rule to "No making custom blocks to replace any blocks living within the Variables palette".

lol, sorry.

yeah IK, that was just a prototype. but you could do a text conversion for lists ( set variable to ([json V] of @list) :: sound ).

I mean, that really, really limits you i guess.

the problem with that rule is that my last example didn't use any of those.

much better, but you will have to make some replacement depending on the project, no?

Here's my attempt for a variableless script that stores and uses stored data

then the (answer) 'variable' used it your script wouldn't work as part of the challenge...

The answer block is part of the sensing category. If we're going to be pedantic, then for each (item) in (split (answer) by [[letter] v]) { } and unicode of (item) technically violated it as well.

Okay, let me remind y'all the challenge.

  1. You can't use anything from the variables section (lists count also).
  2. You can't make custom blocks to replace any of the blocks from the variables section.
  3. No empty costumes.
  4. No sprites that barely have any scripts in them.

I don't have my project yet, because I haven't found the time.

You're right to put it in scare quotes; ANSWER is nothing like a variable. It's a niladic function. (For example, you can't say SET (ANSWER) TO 87.)

Your game, your rules, but I think that's a wrongheaded one. Perhaps you're thinking of Scratch lists, which have names as variables do, and are routinely mutated with commands such as INSERT and REPLACE.

Snap! lists don't have names, and although you can mutate them as in Scratch, the preferred techniques are functional, using blocks such as MAP and KEEP to create a new list rather than mutating an existing list.

Just my opinion...

To this point: What do you hope to get out of playing the game? I mean, what part of the challenge is interesting?

What'd I'd suggest: Take an existing project on the community site and remix it to not use any of X / Y / Z functions.

I'd say:

  • First no global variables
  • Second no script or local variables
  • then no lists, though I agree with bh's view.

I would actually consider trying to make custom blocks, but still avoid SET, so you ca pass parameters around, but you can't save them in some intermedia state. You might look at the PIPE function, if you've never used it before.

Otherwise, if you're looking for ways to store data without using variables or lists, I would start exploring meta programming in Snap!, and use both dynamically created custom blocks as well as their (fake) definitions as a means of storing and retrieving data.

This is absolutely not what we mean when we talk about "functions as data", but I've always thought it is an intriguing abuse of metaprogramming. :wink: