Debugging arrays is so confusing...

Discussion and feedback on Construct 2

Post » Sun Jul 20, 2014 1:19 am

Image
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Sun Jul 20, 2014 2:11 am

But it has 0 height.
Image ImageImage
B
172
S
50
G
182
Posts: 8,439
Reputation: 115,097

Post » Sun Jul 20, 2014 2:21 am

I guess you'd expect the X to be horizontal ? How should the display of a width of 100 be performed then ?
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,328
Reputation: 71,298

Post » Sun Jul 20, 2014 2:25 am

newt wrote:But it has 0 height.

It makes no difference

Kyatric wrote:I guess you'd expect the X to be horizontal ? How should the display of a width of 100 be performed then ?

Maybe make the array an actual table (like an Excel sheet) and put a scrolling bar on it. This way you could see the array exactly like it is. The current way you can't even see at what Y any value is unless you count it yourself
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Sun Jul 20, 2014 2:31 am

Maybe @Ashley could have a look at this to offer a better readability.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,328
Reputation: 71,298

Post » Sun Jul 20, 2014 3:50 am

Well Firefox does have the 3d elements thing.
Might be interesting to use that somehow.
Image ImageImage
B
172
S
50
G
182
Posts: 8,439
Reputation: 115,097

Post » Sun Jul 20, 2014 8:38 am

7Soul wrote:The current way you can't even see at what Y any value is unless you count it yourself

300% agree, I'm working on a few array and the biggest is 150x100x10 array. It's hard to determine (close to impossible) whether my project is working as it should, there's no visual way to tell me if i missed an array index offset by 1 or simply the intended value had change or not.

Kyatric wrote:Maybe @Ashley could have a look at this to offer a better readability.

+1 to this. I want to emphasis that the readability of the debugger does a lot of impact in doing projects efficiently. I rather use the automated debugger (a better readability than the current) rather than wasting a lot of time creating my own textbox/spritefont/etc debugger for the arrays.

Time should be spent more on working on events/codes/mechanics for the game, not debugger.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Sun Jul 20, 2014 11:50 am

It's a difficult and non-obvious problem as to how to display large amounts of array data in the debugger conveniently. Even C++ debuggers usually only show a single dimension at a time regardless of how much data is in the list. Given a 100x100x100 array with random data in it, what could the debugger display that would be useful and allow you to quickly solve whatever problem you're having?

I think to some extent you will need to come up with your own development visualisations using events. For example if you have a 2D array representing an in-game grid, it is probably better to come up with some development-only events (that are removed/disabled for release) that display a text or colored sprite in every cell to indicate its contents. That is probably a more useful than a raw debugger view in a separate window, since you can customise the way the information is represented, and it is directly connected to the gameplay. A good example of this is the pathfinding map visualiser in some of the pathfinding demos that come with C2: it shows the obstacle map using an overlay of red sprites the size of each cell. That's far more useful than browsing a huge grid of 1s and 0s in a debugger.
Scirra Founder
B
402
S
238
G
89
Posts: 24,628
Reputation: 196,023

Post » Sun Jul 20, 2014 1:51 pm

Arrays looks quite good in debugger actually, but if something can be improved then maybe try to display Array depth (Z) in some more clearer way. Can be confusing sometimes while Height (Y) and Depth (Z) are shown in same line.
You do not have the required permissions to view the files attached to this post.
ImageImageImageImage
B
158
S
67
G
43
Posts: 2,603
Reputation: 36,003

Post » Sun Jul 20, 2014 7:25 pm

Ashley wrote:I think to some extent you will need to come up with your own development visualisations using events.

This should work for now

Image
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests