it pretty simple to understand it with a chart I made for you. so let break down the code to understand it because the chart has more to say that the code in game doen't tell you straight out. Why is that you may ask?
it will show if player look at it.
now look at the chart i made sorry it not the best looking chart but it will do for the time being. notice the chart layout it's to give you a visual idea of how nmap works when your coding a door ect. but more on that latter. anyway if you noticed how in game2rpg is coded at @drawitem
you ask how is that?
well it a veiw point of distance of object like treasure chest by 3 space ahead of player really their is 4 spaces ahead tho.
so if you look at @MAP1 you will see different numbers in the data of map1 right those are points of reference on the map like a wall or ladder,ect. nmap read distance of let say 2 which is a ladder, if player is 3 spaces away from the number 2=ladder
now how game was wrote is fine as is and simple it show no matter if your N,S,E,W of a treasurebox, ect. you would never veiw a door right as it is coded right now. as we know now a player point is always nmap(0,1) no matter what right, good.
sorry had to make drawing.
anyway, nmap(x,x) works like this
if nmap is nmap(0,1) then it read block player on, you wouldn't want a sprite on the player they won't see it. but you would for trigger a event to happen.
good you asked so your having trouble understanding how NMAP works. I will explain in detail how it was written and how the game uses it to show sprite, art by gline gbox, ect, when a player moves around in the maze. remember it a illusion too the players one point prespective of direction.
there will be many post to complete topic here.