This is the first time I develop a video-game, and I am kind of lost.
I would like to know about ways on representing 2D maps on a top-down perspective game...
(Like this one: vengadoravg.github.io/1/game.html btw, this is the first game I develop)
So far, I've found one way to represent a 2D map in a top-down perspective game:
Using a matrix. Where a normal floor place is represented by some number (or character), the obstacles are represented by a different number, and the enemies by another different number. This matrix would allow me to run graph theory algorithms and crazy things, but i think it would be, algorithmically, very complex, because the graph would be really populated and dense. Thus, all the sprites should be the same size, otherwise, the matrix would be really, really big.
Are there any other (better) ways?
In terms of algorithm complexity, which of them are the best to run graph theory algorithms?
I apologize if the question sounds subjective... but i think the superiority of an approach can be determined by its algorithmic complexity :)