Friday, 30 September 2016

New task

So I've been poking around with the map function and drawing, updating the class structure, and commenting code, but I haven't made any functional changes to gameplay.
After a couple nights break from casual coding, the plan is to do some more mechanics.

Wednesday, 28 September 2016

Error corrected

Still trying to get the min-map working.  Trouble was basically around making sure that when drawing the map to screen the code wasn't trying to get map info from the map array beyond the bounds of the array.
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)

Tuesday, 27 September 2016

Mini map

Trying to get a minimap happening.
I think it's a matter of making a new or adjusting existing drawing routine to have a scaled map in a different picture box.  I can do two things with the current build.
1) put a foggy map in both picture boxes

2) draw a player (on move, not initially) in a fixed place on the minimap


What I'd like to have is the minimap at a different scale and for the player to be centred.
I'll see what I can achieve tonight.

*edit*
So.. something more to show... not to scale, and not following the player properly, but... mini map displayed


 *edit*
Even better now.  Map will display at a different scale to the big map.

Still some issues around player placement, movement, development etc.  but at least it's showing something!