The tricky part, for me, was wrapping my head around the relative positions of the player, the large map and the overall map. Also making sure that to have the player centred on the mini-map, it needed to be drawn at a slight offset to the relative player position.
Testing (i.e. creating and clearing multiple maps) appears to not throw up any errors.
Code from last night has shrunk by about 10 lines. If that is a valid metric for better code, I've made an improvement!
Pics: large map with fog showing player's position. Mini-map currently without fog showing area around player, but not showing player in correct place yet.
With fog off, shows the position of the mini-map (been using this view to check that the mini-map is showing the right part of the map)
No comments:
Post a Comment