How do I create image-map with touchable areas?

0 favourites
  • 7 posts
From the Asset Store
A template which allows you to customise the controls of your game.
  • I have a gameover screen with 3 buttons - replay, highscores, back. The screen is one big png, so in fact there are no buttons, it's just one picture.

    Can I capture where on the sprite the user touched (something like in this html example, but with touch control)?

    Is there any impact on performance creating 3 transparent sprites over those button areas or is there a workaround which could be done with just events?

  • No impact at all with 3 transparent sprites unless you are running it on an abacus

  • Your idea of creating three transparent buttons is perfect for this purpose, you could also make them opaque but set them invisible on their properties.

    Performance shouldn't be affected by only three objects . I'm making a game where there are 65 buttons in only one layout and performance is a little bit affected

  • My game is already taking 70% CPU power, I'm trying to cut down on everything so I thought it might've helped a bit, thanks for your responses.

  • 70%??

    On mobile I hope!

    How much big is your png map?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 70%??

    On mobile I hope!

    How much big is your png map?

    Yes, on a cell and only on an old one. Good is, it still manages to do over 50fps. That png is 400x400, but it has to do more with the game still running in the background while the png is displayed than with the size.

  • Oh, it seems that everything is ok, if you add the buttons and test the performance, let us know

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