Heey everyone!
To all you coding gurus out there; is there a way of quickly figuring out an arrays length? I'm trying to implement a level saving / loading functionality and am wondering if I need to use a separate array to just store the lengths of multidimensional arrays and restore the level from there. I am intending to use the built-in functionality of saving arrays and JSONs. Can I read the lengths from those somehow?
In terms of code, I'm setting a random map size for the X axis and Y axis, then use a MAP[size_x,size_y] array to fill it up with objects. I can restore the placed tiles just by reading their x,y,z locations which I save also, however the MAP[a,b] array is used for pathfinding / player seeking and some behaviours, so it shouldn't be empty. Same goes for arrays that save enemy positions for example.
Anyway, some tips are greatly appreciated