How do I create image maps

Get help using Construct 2

Post » Tue Apr 28, 2015 12:56 am

Hi

I'm busy making a point and click adventure game. From what I gather using other browser based games it normally use js image maps in order to deal with scaling and different display resolutions.

I'm not keen to use layers or "hidden" object because they don't resize and need to be updated when the image change resolution.
Is there a way to achieve creating these imagine maps \ zones that deals with scaling and also allow for easy definition, i.e. if a user uploads an image he can define these zones. Some restrictions can be put in place to deal with a fixed resolution or image size.

Thanks for the help!
B
6
Posts: 10
Reputation: 285

Post » Tue Apr 28, 2015 2:20 am

Honestly, I don't see anyway but using hidden/null objects. You will have to just create the algorithm for adjusting the hidden objects position when needed. Getting the new scale of the image and applying that scale to the object position. I did some like this for a tool I built for Renpy helping users generate the hotspot code that they needed. I kept the scale size to apply to the objects that the user laid down as hotspots. The hotspots was then put in a array that held their information. For the resolution you can just keep track of what the original resolution was versus it current to get the scale percentage.

This is what I made in Construct but I had to event it to do what I wanted.
Image

Image
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Tue Apr 28, 2015 2:54 am

I would check out and read up on the "anchor" behavior. I think it would be pretty easy if you where familiar with the slicing tool in photoshop. You could get the x,y cords from photoshop. Shouldn't be too hard with a little thought.
B
10
S
5
G
4
Posts: 23
Reputation: 2,923

Post » Tue Apr 28, 2015 3:08 am

Thanks for the replies. I'm really interested in doing it in a fashion that it can be used at run time. In order for player to add their own image map or hot spot. In some cases it might just need to display a tool tip and in other places it should be clickable and then the user is directed to various layouts.

Thanks for the advice thus far.
B
6
Posts: 10
Reputation: 285

Post » Tue Apr 28, 2015 10:19 am

Yes the way mines is done is during runtime. Mines just serves a different purpose. You can check out how it runs https://www.dropbox.com/s/gs9bgmv6a31iql.zip?dl=0.

I am still working on it in my spare time but they find it usable enough right now. I have plans to make it they can move the hotspots around if they want to.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests