Expression Stacker - A kind of 'click' expression

Chat about anything not covered in these forums, but keep it civil!

Post » Tue Dec 22, 2009 2:36 pm

I agree with Deadeye, Its practically the same thing. I think it may even end up destroying readability for those really long expressions; you'd have a pyramid sky high.

[quote="deadeye":1ywec0yf] I just can't think of anything that doesn't involve a picture of five apples over a picture of three apples and a cartoon worm wearing glasses asking how many apples there are all together.[/quote:1ywec0yf]

:lol: this pretty much sums it up. And I assume you meant 5 apples and a worm.... or else i'm confused. :mrgreen:

[quote="Lost my Keys":1ywec0yf]Basically, exactly the same way it is now, but with more information on what that particular step does.[/quote:1ywec0yf]

I think that's what the wiki is for though, all the expressions are explained clearly. It could use some expansion however.

It would be great to find a middle ground like Davo said; between text and graphics. I just don't see how multiplying by 3 with (*3) in text is any more complicated or unreadable than a square or node which says multiply::::__3___::::: __number__:::::.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Tue Dec 22, 2009 3:05 pm

i think this would help those who are weaker with their math skills but are strong visual learners to be able to see a visual organization
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Tue Dec 22, 2009 3:24 pm

You know, there's another idea that I think tossed around in the chat a while ago...

Make the expression editboxes multiline-togglable. I noticed that if you write the expression on multiple lines in say Notepad and paste it to the expression editor it doesn't destroy the multi-lining and it even shows up in the event sheet editor.

So that instead of having just

clamp(3*distance( mousexy, xy),0,100)

you could have:

clamp(
3*distance( mousexy, xy),
0,
100
)

Of course for such a simple sentence it doesn't do much but for me it helped writing some more complex stuff.

Another thing that would be useful is syntax highlighting. And one thing specifically - when your text cursor is over a bracket, ( or ), it will highlight the equivalent start/end bracket. This is what editors like Notepad++ do by default and it helps so ridiculously much it should seriously be implemented in everything. Especially in Construct, since you can easily write expressions that end up looking like lisp (with (all (the (goddamn (brackets))))).
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Tue Dec 22, 2009 6:26 pm

multi-line and color coding would be helpful, I agree.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Tue Dec 22, 2009 6:37 pm

I tend to write stuff in notepad in multiline and when I'm done, I remove spacing and copy to construct.

What do you mean with stacking? HP48 had "stack" (RPN) and most people were baffled by it. It was awesome for doing big calculations without using parenthesis but that wouldn't even apply here.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Dec 24, 2009 3:06 am

haha 'Expression Stacker' was just a name for it because I imagined people dragging and dropping expression bits and pieces onto each other like a stack...or a pile...

Anyway I dont think it's really something that would be useful. Its good practise to learn how to type expressions. I added syntax highlighting and bracket matching to the expression editor anyways.

Here was a final design I came up with



Basically, a 'block' could be setup so the text was in the middle...so the Multiply looks like a proper multiply...and secondly the parameters dont have text for them (Multiply doesn't need text with A, B) then the stack above is lowered.

The only remaining problem with the stack is if you do something like:

5 + 3*3 + 2 you end up with 3*3 as one stack, and 5 + (3*3) as the stack below, then (5+(3*3))+2 as the stack below that.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Fri Dec 25, 2009 6:16 am

actually that's quite readable... shows the parameters AND their meanings... and nesting is crystal clear. Space could be an issue though. Perhaps a "show in expression editor" link?

I'd rather see bugfixes though XD
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Previous

Return to Open Topic

Who is online

Users browsing this forum: LoneVox and 3 guests