If your going to be using structured maps that size you should really be using lists, not dictionaries. There are a few tricks you can use for navigating maps that size and doing border collision checks, such as liberal use of the len() function, which can tell you how long a particular axis of an array is. For example:
maps = [[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0],
[0,0,0,0,0]]
print(len(maps))
print(len(maps[0]))
This creates a 5 by 5 2D map, the first print statement prints the length of rows there are, which would be considered vertical, and the second tells you the length of each individual row, which would be horizontal. So a 2D array could be considered: array[y][x], though I suppose you could arrange it however you like. Keep in mind that len() will return the total number of items in the list from 1 to whatever, but that lists start at 0 and go to the end point, so if you plan on using len() for indexing arrays, always do len()-1. Now as for how to control the tiles surface, all you really need is the number value, so 0 could be empty space, but you could switch that to 1 to represent a wall, 2 for a stairwell, 5 for a pork-chop, etc. Similarly you could replace the number value with a class reference for the player or an enemy NPC, or any number of things. For playing sounds, what you could do is take the players x and y coordinates within the map, and iterate through a section of map to play sounds, for example:
#3 is a sound we want to play
if maps[player.y][player.x-1] == 3:
sound.play()
elif maps[player.y][player.x+1] == 3:
sound.play()
elif maps[player.y+1][player.x] == 3:
sound.play()
elif maps[player.y-1][player.x] == 3:
sound.play()
This would play a sound in four directions around the player, but another way to do it would be like this:
for a in range(self.player.y-3,self.player.y+3,1):
for b in range(self.player.x-3,self.player.x+3,1):
if a >= 0 and a <= len(maps)-1:
if b >= 0 and b <= len(maps[0])-1:
if maps[a][b] == 3:
sound.play()
This also checks to make sure the x and y values are still in bounds of the array, which could cause errors. You could also do the same thing for the player reaching the edge of the map, and wrap around the map to the other side, or link to another map array, etc. Then there's getting into things like slicing arrays and such, another library you might want to check out if you plan on doing heavy array lifting would be Numpy.
-
BrushTone v1.3.3: Accessible Paint Tool
-
AudiMesh3D v1.0.0: Accessible 3D Model Viewer