How do I Make a scrollable zoomable map

Get help using Construct 2

Post » Tue Jun 14, 2016 2:08 am

Hi, This is my first post :) but I have the feeling that this is an awsome comunity so here we go:
I'm trying to make a map, It should be scrollable by sweeping or in the case of the mouse by going to the edges.
It should also be zoomable, should stay in its boundaries, and should have hotspots attached to it (in my approach they should be attached because I'm moving and scaling the object/layer but if there's a better way by all means enlighten me)
My questions are if not hard, many:
-Is there an easy way to approach this? the way I've been doing it is really cumbersome.
-should I zoom in and out using the layer scale? the use of the layout zooms my UI also.
-if the map image is big, should I use a tile Map? what are the advantages?

Thanks In advance.
B
6
S
2
Posts: 6
Reputation: 1,067

Post » Tue Jun 14, 2016 2:57 am

@Animatect
Here is a scroll-able, zoom-able map example I did last year for someone asking similar questions. I might do some things different now, but this should give you lots of ideas to work with.

you can use layout zoom if you want - just disable zooming for the UI layer by setting its Scale rate to zero.

Tile maps are a very good idea for big maps - if you can build the map from a reusable tile set.

capx: http://www.rieperts.com/games/forum/Starcraft_map.capx
B
94
S
33
G
20
Posts: 438
Reputation: 17,615

Post » Tue Jun 14, 2016 4:36 pm

This is just what I needed, thank you so much!
Just by curiosity, what would you do diferent now?, it's just that it seems perfect for me :)
B
6
S
2
Posts: 6
Reputation: 1,067

Post » Tue Jun 14, 2016 7:14 pm

@Animatect
I didn't look at my code very closely, I just know that I have learned a lot over the last year. The zooming in and out doesn't feel as smooth as I remember, so I think something there could be improved. Also, the invert check box doesn't actually do anything, and I seem to remember making that change which direction the screen scrolls, but I couldn't find any other version of the capx...

anyway, good luck with your game!
B
94
S
33
G
20
Posts: 438
Reputation: 17,615

Post » Tue Jun 14, 2016 7:55 pm

Thanks!
B
6
S
2
Posts: 6
Reputation: 1,067


Return to How do I....?

Who is online

Users browsing this forum: ladjuric, plinkie, Syazanie Amirin and 3 guests