P = Player at position X=5,Y=5
3 4 5 6 7
+---+---+---+---+---+
3 | | | | | |
+---+---+---+---+---+
4 | | | | | |
+---+---+---+---+---+
5 | | | P | | |
+---+---+---+---+---+
6 | | | | | |
+---+---+---+---+---+
7 | | | | | |
+---+---+---+---+---+
If player presses UP then then the map will be as follows
P = Player at position X=5,Y=4
O = Object at X=3,Y=2
3 4 5 6 7
+---+---+---+---+---+
2 | O | | | | |
+---+---+---+---+---+
3 | | | | | |
+---+---+---+---+---+
4 | | | P | | |
+---+---+---+---+---+
5 | | | | | |
+---+---+---+---+---+
6 | | | | | |
+---+---+---+---+---+
Now as you can see there is an object at X=3,Y=2.
As well as drawing the map, How would that object be pulled from a database? baring in mind that multiple items could be shown on the map at once.
Any help appreciated.
|