While I respect Disch, that is his opinion. Everything in C++ has its place and purpose. Everyone raves about vectors, but in truth, learning 2D tile mapping is much easier to learn when using a static multidimensional array to get the hang of it before tackling multidimensional vector arrays to allow for dynamic maps to be loaded.
I understand what you are saying and agree that multidimensional arrays have their place (along with everything else that we consider "evil" or bad practice). The point is that Lumpkin never said that they were bad, he simply asked why the OP still uses them implying that there are better options out there (which, ironically, you seem to agree with) and you (wrongly) called him on it.
No we aren't derailing it, as we are giving our interpretation of the discussion.
Danny Toledo wrote:
The point is that Lumpkin never said that they were bad, he simply asked why the OP still uses them implying that there are better options out there (which, ironically, you seem to agree with) ...
Yes...
Danny Toledo wrote:
and you (wrongly) called him on it.
...and no.
Yes there are better practices. No I'm not wrongly calling him out on it. If the game uses static set map sizes per area/level (like 64x64 tiles per map) then a simple multidimensional array is perfectly fine . Now if he has alternating maps like level one is 32 x 32, level two is 64x64, level three is 24 x 49, etc. then vectors would be better for the ability to adjust size accordingly.
It's not arguing, we are pointing out the pros and cons of arrays versus vectors (well one of them). I think, if you have gotten any help from here, that may be the only help you get. I tried to get some of my friends to jump at helping you, but they saw the code and said no. I quit helping on projects because I don't take direction well so all I can do is offer advice from the experience I have and the things I've read and been told over the years I've been doing this.