OH, NO!!! Not another array-match-3-question...

ZillaZilla Member Posts: 157
edited November -1 in Working with GS (Mac)
I am currently working on a hamiltonian circuit game http://en.wikipedia.org/wiki/Hamiltonian_path (kind of a travelling salesman problem)

image

The data structure for these kind of problems require mathematical graphs that are translated into "computer language" with matrices (2-dimensional arrays).

I read that some gs devs use integers as a 1-dimensional arrays and store the values in the digits of this number and address them using the modulo function as an index.

Did I miss a better idea? Because I saw that e.g. Darren/UtopianGames offer a match 3 game template and I can only imagine that you can keep track all the possibilities, checks, neighbours etc. with a 2-dimensional matrix.

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    Yes i had to think a little different to get the results i wanted.

    We have just updated to 1.1 which includes a really nice feature that checks if a match is possible.

    It was of course possible without arrays and it works perfect.

    Darren.

    image
Sign In or Register to comment.