Dynamic minimap, please help me fix it

Get help using Construct 2

Post » Tue May 13, 2014 10:59 pm

Hi guys,

So I have been trying to make a minimap using the tutorial from here: https://www.scirra.com/tutorials/834/basic-mini-map
Unlike the tutorial, I want a part of the whole map not everything. I managed to get the minimap working, and got on the minimap what I had on screen. However it's kind of pointless to have a minimap if you see the same things you've alreday have on screen.

So instead, I wanted to see twice the area I had on screen in the minimap so it's more interesting and that's why I ran into trouble.

Everything works fine when the minimap size has the same ratio as the container it gets into:
- resolution: 1080 x 720
- container: 180 x 120
- ratio = 1080 / 180 or 720 / 120 = 6
- minimapsize = 5136 / 6 = 856 px

t = 6
scrollx = 540px
scrolly = 360px
Formula used: IslandMinimap.CoordX-scrollx/t+WindowWidth/2/t

However when I try to see twice the amount on the minimap by reducing its size to 428 px (856/2), then it still works but the minimap does no longer fit the container though I thought by slowing down the scrolling it would work.

Obviously I'm not really good at math, so any help would be greatly appreciated. I have attached a file containing both the working version and the non working version I'd like to get fixed.

Thanks for your help!
You do not have the required permissions to view the files attached to this post.
B
12
S
2
Posts: 85
Reputation: 899

Post » Wed May 14, 2014 11:52 am

This is torturing me, I'm losing sleep over this! :D

You can test the working version here by the way: http://konnee.free.fr/Minimap/
B
12
S
2
Posts: 85
Reputation: 899


Return to How do I....?

Who is online

Users browsing this forum: matriax, work3 and 9 guests