Array Editor - Bug or By Design?

0 favourites
  • 10 posts
From the Asset Store
Fly Bound
$2.49 USD
Design for game, asset for game, game kit, UI design, completed design for game FLY BOUND
  • Hey there, i was wondering if it is by design to limit the Array Editor Depth to 100 (sheets)? I used to be able to set this higher but now i cant seem to edit my level designs because typing in any number higher than 100 will force it back to 100.

    Im using the array editor as a level editor with each ‘sheet’ being an individual level, and i already have more than 200 levels so was curious if i should move to a different system entirely or if this is something that can be fixed/changed? I don't want to file it as a bug if its not, but I also need to figure something else out for my level editing if i cant use the array editor.

    Thanks so much!

  • I just checked in the older r225 stable version I am currently using and it does seem to limit the depth to 100 sheets. So it appears to have been this way for quite a while...

    you can add as many array files as you want, so you could have New_Array_100.json, New_Array_200.json, etc...

  • Just checked this to be sure, and seems that 100 depth has been the limit since the feature was implemented. So I am not really sure how you were ever able to do more than that.

  • Just checked this to be sure, and seems that 100 depth has been the limit since the feature was implemented. So I am not really sure how you were ever able to do more than that.

    Hahah DiegoM - i used to be able to manually type a higher depth into the box and it would set the array to that depth then i could press the up/down arrows to navigate through it, but it was definitely obvious something was up because entering "200" into the depth would allow editing the higher sheets, but the depth would still show 100. It wasnt until just recently where entering the higher depth would get automatically switched to 100 and anything higher than 100 would get deleted.

    Is there any chance this will get updated in the future or some workaround to allow it? Should i file a bug? I really do need to be able to have higher than 100 for my uses, but if that's not possible I need to come up with my own level editor i think.

    Thank you so much!

  • Ah I just saw AllanR's post. I definitely could just have multiple arrays with 100 values each. Ill look at setting that up and that should tide me over for now. Is there a reason its limited to 100? Like is there a concern if i have arrays that big? For the purposes of my game I will probably want to combine my multiple Arrays into one for the level creation during gameplay but is that a problem in any way?

    Thanks again!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you were able to set depth to more than 100, that was definitely a bug. Not being able to do it is the correct behaviour.

    I don't think there is any particular reason for the limit being at 100, it seems like it was just set as a sensible limit. Obviously it can not be infinite as that could eventually lead to running out of memory.

    The thing with the depth property is that each additional increment is essentially adding a whole extra sheet. If you are using relatively small sheets, let's say 10x10 for example, that is fine. In that case each depth increment would be adding an extra sheet with 10 rows and 10 columns, which would add up to a total of 100 new cells. If your sheets are larger though, each increment could potentially be incrementing the total cell count dramatically.

    The limit for width and height is currently set at 1000, in the case of using a sheet of 1000x1000, each depth increment would be a million extra cells, which could rack up memory pretty quickly if left unlimited.

  • DiegoM

    Yeah my level sheets are 8x8 so definitely small. Is there some kinda JS hack or something i can do to allow > 100 depth? :D

  • DiegoM or AllanR - Ive tried breaking up my large level array into smaller 100-depth arrays to fit within the limit but i dont really know the best way to load those in / combine them into a single array now.. would you happen to have any advice?

    Previously I was simply using the AJAX object to

    On Start of Layout

    - Request Levels.json (Tag "Levels")

    On Ajax "Levels" Completed

    - LevelArray -> Load from JSON string AJAX.LastData

    But now since i have 3 arrays, im not sure how to easily transfer the contents of all 3 into one single array (which i use for outputting the next levels randomly as you play).

    I really appreciate any help you could give.

  • that actually turned out to be slightly harder than I expected... maybe I am just tired :)

    this file merges 3 arrays loaded with AJAX at the start. It also populates a drop-down list so you can check that the levels match the project files... each project file is only 10 sheets of 8x8 cells but it will work with as many sheets as you can give it. The AJAX data is loaded into a TempArray. The LevelsArray starts out with a depth of 0 and then each sheet is pushed on the back of the array as it is loaded.

    https://www.rieperts.com/games/forum/MergeArrays.c3p

  • AllanR you are a master, thank you so much for your help. Ill dig into this today. I really appreciate your support - lemme know if i can paypal you some money for a couple coffees/beers. :)

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