I've looked at several threads, manual entries and tutorials but I still can't find the solution to my problem.
I want to do a grid where every column has its own queue (very similar to a 4 in a row game but inverted [like if you could insert coins from the bottom]).
I've tried the push and pop functions and they work great with 1D columns but, when it comes to 2D, I don't know how to indicate wich column must be pushed and poped.
Any ideas? I supose it should be an easy task but I don't know much about programming so I can't really figure it out by myself.
Sorry for opening a new thread about arrays but ,believe me, I have checked the entire page searching for an answer but coudn't find anything related.
bye and thanks!
've tried the push and pop functions and they work great with 1D columns but, when it comes to 2D, I don't know how to indicate wich column must be pushed and poped.
The push or pop will affect all the columns. With the array all the columns are the same height, and all the rows are the same width.
The solution is to have multiple instances of 1d arrays.
Develop games in your browser. Powerful, performant & highly capable.
I thought on having multiples arrays but I suposed there was a better option.
I gave the push and pop examples but if you know an alternative way to acomplish this queue effect without'em, i'll apreciate it.
Here is an example of my suggestion:
An alternate would be to not use an array at all, just use sprites and collisions to do it visually.
Thanks! That may work or, at least, simplify things.