I am working on a simple maze game for my first full attempt at a game, and I am wondering how efficient my method for collision is. To put it simply I have a map:
.......[][][].......
[][][]..............
The [] represent blocks. My idea is to just have the coordinates of those blocks set in a few constants and check for my character coming into contact with the coordinates and the appropriate action being taken if it collides or not. So just how efficient will this be? I have about 20 blocks in my map. Is there another way anyone can think of that isn't overly complex
?
.......[][][].......
[][][]..............
The [] represent blocks. My idea is to just have the coordinates of those blocks set in a few constants and check for my character coming into contact with the coordinates and the appropriate action being taken if it collides or not. So just how efficient will this be? I have about 20 blocks in my map. Is there another way anyone can think of that isn't overly complex
?