It is very hard to read/write math formulas in Scratch.
I suggest a formula block that you can drag in any number field, and when it's released from the mouse, a little window pops up ("formula editor") where you can type the formulas.
( myVariable * anotherVariable ) + 26.8
When OK is clicked, Scratch should have to change the typed code into blocks if possible, elsewhere a message with "You have typed an error in your formula: [the error] "
When cancel is clicked, the formula block should have to dissapear, and the number field should have to be empty again.
Any thoughts?
Joren
Last edited by JSO (2008-03-16 03:29:59)
Offline
I do like this idea of yours. When I try to use formulas I always screw something up because I accidentally put a block in the wrong position due to scratch's "drag the block in" function. If you could just write it out and then scratch could create a variable out of it that can constantly change to fit your formula... Or you could make it so it remebers the formula in a block and lables it "formula1" or "formula2" and so forth. The it gets treated almost like a variable so you can insert it into almost anywhere.
Offline
I agree with you folks that creating long formuli in Scratch can be very difficult. Part of the problem is the drag-and-drop interface. It can be very hard to get a large lump of blocks to insert itself in a small opening in another block. It would be nice to be able to switch to a select-and-click interface at times. I'm visuallizing an interface where you would first select a chunk of blocks by clicking on it with your mouse. The chunk would become highlighted but would not move. You would then take your mouse and click on the spot where it was supposed to insert and it would then perform the action.
To summarize, I am proposing improvements to the block interface rather than scrapping it entirely.
Offline
In second thought, i see that my suggestion is "remove the block interface for numbers" - and it was not meant to be so. The reason why I suggested to type formulas was because it is hard to write them, but also to read them.
Like Paddle2See said, it is way better to improve the block interface "rather than scrapping it entirely".
My suggestions on this:
drag selection - select by using a rectangle and holding your mouse.
shift-click - add a block to your selection
and a right click (or control click for mas) menu item "insert selection here".
Last edited by JSO (2008-03-20 08:55:56)
Offline
Interesting idea, I like it but I do not think it should be a block. Because It would not do anything in the game. It would only help you when scripting.
Offline