Debugging arrays is so confusing...

0 favourites
  • 10 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • But it has 0 height.

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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • But it has 0 height.

    It makes no difference

    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

  • Maybe Ashley could have a look at this to offer a better readability.

  • Well Firefox does have the 3d elements thing.

    Might be interesting to use that somehow.

  • 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.

    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.

    [quote:3lhwrdjw]

    Time should be spent more on working on events/codes/mechanics for the game, not debugger.

  • 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.

  • 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.

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

    This should work for now

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)