0 Favourites

How do I... make a zoomable vectorlike galactic map

  • Hello,

    1st problem in my 1st construct-project... how would I do the best some sort of galactic map (oops, seems like I cannot post links yet), anyways, Idea would be to have smaller area ("map screen") on the game view that would contain the map, that would be zoomable and scrollable, like googlemaps. Glactic map would be lines and dots...

    Using superbig bitmap won't work, don't know how to do vectorlike map (in construct, I do know vector softs like Illustrator very well).

    Any ideas? What I need to do is quite simple, but figuring out the best way is not that simple.

    I plan to make thse stars clickable somehow later, to get info about those star systems, but that is another problem...

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • using too big images is a big problem for web apps, I experimented myself with this problem some time ago and the best solution for me was to use a black 16x16 tile I used for the background and have separate images for galaxy clouds, stars and planets that got just places onto my map (can be done either in the editor as a fixed position map or by generating the map during runtime by using random x/y coordinates.

    About the zoom, you can put the planet on a separate layer that is just scaled up and down when you want to zoom. Having it on a separate layer, it will not affect the background when you play around with scaling.

    For clickable, this is not a big problem, just have each planet as a separate object and when you click on it, do your stuff in the event editor

    Hope this helps for the first stept

  • Hey, thanks!

    That was fast Good ideas there... doing the planets as a separate objects is of course a good and working solution, ja tilemaps would be good for the "grid" background...

    with zoom I meant zoom that zooms the whole map, not just one planet... kind like a full view of the galaxy -> solar system -> planet type of zoom. That could be implemented in some kind of steps instead of "infinite" zoom.

    I still have one problem ideawise, how to do / draw different kind of lines (solid / dashed so on) between "systems" - "routes" from one system to another?

  • What I had in mind was this layout:

    4 Layers:

    • 1. Black Background, just as big as the screen and no paralax. No Scaling
    • 2. Stars, a couple of star maps that are bigger as the screen itself with that the stars move slowly when you move around. Scales a bit when you zoom in or out
    • 3. Galaxy Clouds, slightly bigger or equal as the Stars Layer that it also moves around while your are scolling. Also scales a bit when you zoom
    • 4. Planets, biggest layer. Planets places all over the map. Scales more than Layer 2 and 3 when you zoom in or out. This gives a nice 3 dimensional effect

    About the routes system, this is unfortunately something I don't know anything, but I am sure someone else can give an idea on how to do it.

  • Thanks again,

    Will try that layered approach... found a promising thread with search about drawing lines, "[PLUGIN] Canvas" thread. It seems that Construct might be afterall my choice for the "project"...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)