I was once again reading the Tile Maze tutorial on gametutorials.com. Though I have read it a few times I still dont understand how this line detects the collision with the WALL tiles:
the code was slightly changed (just the x and y point names)Code:// Check if we collided with a wall (Used the 2D to 1D index conversion) if(g_BoardArray[player1->Index.x + player1->Index.y * BOARD_WIDTH] == WALL)
I understand how it gets the top left corner point but I don't understand how that tests for collision with the rest of the user controlled sprite.
If anyone could explai this to me I would be very greatful, Thanks.