Arrays and British driving laws.

0 favourites
From the Asset Store
Make your own Isometric RPG, Visual Novels, or Story Driven Puzzle game!
  • Real simple setup. 10x10x4 array. Clear the array to -1 The test, loop through the x and y for the array, set the x,y on z=0 to a random number.

    + System: On start of layout
    -> Array: Clear to -1
    ----+ System: For "X" from 0 to 9
    --------+ System: For "Y" from 0 to 9
    ---------> Array: Set value at (LoopIndex("X"), LoopIndex("Y"), 0) to round(random(1,1000))
    

    and this is what debug showed me

    I kept thinking, "What the hell? It's skipping over the cells like it has a 'step 4' in the loop" Took me several hours (working with a much larger array, turning function bits on and off mind you) to realized what a jumbled mess that watch output is. It's not the x,y of the 0 layer like I expected. It's the y,z of the x row. What the??? Look guys, I know you Brits do things differently like driving on the wrong side of the road. But seriously, when you go to a museum, do you stand in FRONT of the painting or do you hug the wall and look at the edge of the frame (don't answer that, the dry British humor of an answer will escape me)? Because we Yanks are very x,y,z spatially oriented. Hell, we're even alphabetically oriented that way. That y,z,x thing, man, that's like... driving on the wrong side of the road.

  • The debugger can't show 2D or 3D arrays, so it lists elements on the X axis and shows the Y and Z axes as a comma-separated string. That's all that's going on there.

  • In C2 it also happens.

    I don't get used to it even though time passes.

  • I've also popped a few neurons trying to decipher the debug output from 3D arrays.

    Ashley maybe it would make things a little bit more readable if the z layers were bracketed?

    Fengist's x=0 would then look like:

    (370,-1,-1,-1),(222,-1,-1,-1),(913,-1,-1,-1)...

    ...which is a lot easier to parse.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The X & Y are inverted due to how early computer monitors work, so that's normal. Making a farce like that seems to just show ignorance.

    About the debugger, yeah it's a bit hard to decipher, but it goes without saying that you can't really use that for debugging. I would use the AsJSON expression and load it into the Array Editor.

    Maybe the Construct Team can automate this process, or make the debugger include the JSON string, to be copy and pasted.

  • I've also popped a few neurons trying to decipher the debug output from 3D arrays.

    Ashley maybe it would make things a little bit more readable if the z layers were bracketed?

    Fengist's x=0 would then look like:

    (370,-1,-1,-1),(222,-1,-1,-1),(913,-1,-1,-1)...

    ...which is a lot easier to parse.

    That would have at least made me stop and realize it wasn't an x,y,z representation. I was working with hundreds of cells and didn't stop to count them so it never occured to me that it would be anything but x,y,z. Thank god it wasn't a 200x200x200 array, I would have lost my mind trying to figure out which was which.

  • The X & Y are inverted due to how early computer monitors work, so that's normal. Making a farce like that seems to just show ignorance.

    I've been writing code in one language or another since 1979 and I have never seen the x,y inverted on anything. X has always been the columns and y has always been the rows. So if I'm ignorant, I've been blissfully so for 40 years.

  • Making a farce like that seems to just show ignorance.

    Oh, and if making a farce shows ignorance then the guys at Scirra should truly appreciate the humor in it.

    media.giphy.com/media/7cAGURf0zN2Bq/giphy.gif

  • Dunning–Kruger effect. I'll leave that here.

    Also, 40 years and still ignorant, we're mostly in our teens and twenties here but not this naive.

    Used account: latte1092

    Fengist Dude, that was so rude of me, It didn't come out right and I didn't get a chance to edit when I got banned. I'm sorry, I misread.

  • Dunning–Kruger effect. I'll leave that here.

    Also, 40 years and still ignorant, we're mostly in our teens and twenties here but not this naive.

    Not everyone around here is an entitled teenager.

    And you are ignorant as well and do not know when to keep your opinions and personal attacks to yourself.

    You are indeed showing effects of the Dunning-Kruger effect, and to help you out, I invite you to take some time off of our forums for a few days to reflect upon your overconfidence.

    Please now keep this topic on original tracks.

  • Fengist Dude, that was so rude of me, It didn't come out right and I didn't get a chance to edit when I got banned. I'm sorry, I misread.

  • Fengist Dude, that was so rude of me, It didn't come out right and I didn't get a chance to edit when I got banned. I'm sorry, I misread.

    Apology accepted. Don't ever make me throw Monty Python at you again.

  • Fengist

    > Fengist Dude, that was so rude of me, It didn't come out right and I didn't get a chance to edit when I got banned. I'm sorry, I misread.

    Apology accepted. Don't ever make me throw Monty Python at you again.

    Yeah dude, wouldn't happen again, it was an honest misread. I was about to edit it but I was banned in only a couple of minutes (around 5mins to 20mins.).

    If you look closely at my reply, it was a defense reply, I thought you were mocking us inexperienced. My fault was that I read it fast, but I forgot there's no such thing as fast reading, just skip-reading. Hence, based my conclusions at the last sentence you've made, which is the GIF.

    Lesson : Read twice.

  • Hell yeah, forum drama!

    But I´d agree that the output looks confusing, lucky I never worked with 3D arrays before. I like mekonbekons idea.

  • Hell yeah, forum drama!

    But I´d agree that the output looks confusing, lucky I never worked with 3D arrays before. I like mekonbekons idea.

    I like it better than what's shown now. What I'd prefer is to show the x,y of layer 0 in row brackets and below that the x,y of layer 1 in row brackets. But I also understand that a 200x200x3 array, which is what I'm working with, is a lot of cells to put in one box.

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