Expression Box Can Use a ScrollBar For the Next Update

Discussion and feedback on Construct 2

Post » Tue Apr 22, 2014 5:23 am

This is probably just me.

But, Ashley can you implement a scrollbar for the expression box for the next update?
For a certain function to populate a large array, I require 55 parameters.
After the first 27 parameters for the function, I can't see the other 28 parameters at the bottom.
They are still there and I can change their values via tabbing without any issues other than the obvious difficulty.
Of course, it would be vastly better if I could see what I am doing when I adjust the values of the bottom 28 parameters.

This is the function in question.
Image

Thanks in advance.
B
36
S
18
G
11
Posts: 248
Reputation: 8,694

Post » Tue Apr 22, 2014 5:33 am

Wouldn't it be a better idea to put all your data into an external file, and import it via ajax?
Storing data "in game" is usually thought of as a bad idea.
Image ImageImage
B
169
S
50
G
170
Posts: 8,292
Reputation: 108,728

Post » Tue Apr 22, 2014 5:34 am

No offense, but when you need more than 26 parameters, you should really think about your code.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Tue Apr 22, 2014 5:34 am

I agree that scroll-bar is a must.

However, why don't you populate array using external files?
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Tue Apr 22, 2014 6:31 am

newt wrote:Wouldn't it be a better idea to put all your data into an external file, and import it via ajax?
Storing data "in game" is usually thought of as a bad idea.

Vuuv wrote:No offense, but when you need more than 26 parameters, you should really think about your code.

megatronx wrote:I agree that scroll-bar is a must.

However, why don't you populate array using external files?


It's more convenience for the game I am making, since I plan to create it as an offline version with easy portability.
I rather not depend too much on external files whenever possible to facilitate my design goals
B
36
S
18
G
11
Posts: 248
Reputation: 8,694

Post » Tue Apr 22, 2014 7:09 am

It's no problem to work with JSON Files offline.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Tue Apr 22, 2014 10:43 am

This is crazy, you should never need so many parameters. Use external data files or simply write directly to an array.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Tue Apr 22, 2014 11:01 am

Ashley wrote:This is crazy, you should never need so many parameters. Use external data files or simply write directly to an array.


I need this amount of parameters because there are some computation involved with some of the values in the function.
The values are not constant in what I use them for.
So, I guess, scrollbar support won't be up for consideration, is it?
Well, I will just use another method to circumvent this issue then.
B
36
S
18
G
11
Posts: 248
Reputation: 8,694

Post » Tue Apr 22, 2014 11:38 am

No, I mean in principle it is always possible to use something else to store function parameters, such as local variables, array storage, dictionary, etc. and in this case when you have a great many it would seem to be much more suitable.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Tue Apr 22, 2014 3:27 pm

Use a Dictionary to store you values. Pass your Dictionary custom var name. Also if you want. You can pass the Dictionary.JSON. Then rebuild the JSON. Your sample of need isn't good design. And iv'e never in 22 years of programming ever seen a function require more than 6 paramaters. There is a point if there are more than X params. Then it's better to pass an object with the values rather than the values.

Listen to Ashley. It's his engine. and he's right 99% of the time.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,018


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests