Jump to content

How to approach this: Googlemaps Style drag and zoom with mouse and touch support


Ironcheese
 Share

Recommended Posts

Hi everyone,

I am currently looking into a "game" idea. It should feature a huge "map" like background sprite which the user can drag and zoom. To search for scattered "items" (clickable areas). Like a treasure hunt.
This should be possible on desktops (mouse and mousewheel) and on mobile devices. (2 pointers should be enough).

What would be the best way to do this? Relying only on Phaser or do I combine it with something like hammerjs?

Other questions:
Should I move the sprite inside the world or rather the camera?
How about scaling the sprite? It should behave like googlemaps "zooming" - keeping the current reference point in the center of the stage. (Where ever you clicked / touched)

I dont need explicit code examples, I am looking for general advice / directions on how to combat this challenge.

Thank you.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...