Internal Screaming: Who Needs Math? · 9:05pm March 25th
Me the whole day trying to size a rectangle inside a minimap:
Short background: There is a "play map" with all the heroes and enemies inside it. Then there is a screen where a part of the map is displayed.
Now I added a minimap which shows the whole map and the camera-rectangle (basically, showing you what part of the map you can see).
Everything was drawn by code. Which means I had to use correct vectorial math.
I didn't, because I used the wrong resize factors on the wrong things. A classic pen and paper sketch to visualise what was going on helped a lot—but I still had mistakes until I figured out that the minimap should not be a factor for calculating the camera rectangle size!
So, yeah. Drawing by code.
Fun.
But it works now