Dynamically sizing map regions

Games in project or under development. The posts and games in this section can not ask for money.

Re: Dynamically sizing map regions

Postby tlaero » Wed, 11Mar02 11:02

Phreaky's and my games use a CSS file to set the image size, but have hard coded map regions for the hit targets. The intent of this thread is to investigate methods for making the image size variable and having the map targets scale to match.

I can certainly do it with a lot of Javascrïpt, but I'm interested in hearing other methods. Part of the advantage of how things are currently done is that the html code is fairly simple and readable for the non-coders who use Adventure Creator. It's a fine line between functionality and ease of use that I'm trying to walk.

TheBrain, could you repost the link you provided in the Survey thread?

BKP UP, could you talk more about how to do this with CSS files?

We're 500 HTML files into our next game already (literally) so we probably won't change that one. But I'm open to changes for the next one.

Tlaero
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Dynamically sizing map regions

Postby Squeeky » Wed, 11Mar02 12:45

Tlaero,
I have sent a PM which may be of value.

No promises, my understanding in these matters is minimal.
Squeaky is clean, I'm just a tad messy!
User avatar
Squeeky
Spirit of the oceans
 
Posts: 4169
Joined: Mon, 08Jan07 00:00
Location: Australia
sex: Masculine

Re: Dynamically sizing map regions

Postby TheBrain » Thu, 11Mar03 00:14

The link I posted was http://home.comcast.net/~urbanjost/semaphore.html

I just took a quick look at how they did the fullsize rescaling example (http://home.comcast.net/~urbanjost/IMG/fullsize.html) and it would appear that as long as you use the same id's for the image and imagemap you could do this automatically by just adding a javascrïpt to each page (which should trigger when a resize is necessary).

Now obviously you wouldn't want to bluntly resize the image to the background size, you'd need to maintain aspect ratio and keep room for text, etc.

But as for the basic concept this seems very doable.
TheBrain
star of the reef
 
Posts: 380
Joined: Sun, 09Mar29 23:00

Re: Dynamically sizing map regions

Postby tlaero » Thu, 11Mar03 08:59

Thanks, TheBrain. I'll take a look at that in the next few days.

Tlaero
User avatar
tlaero
Lady Tlaero, games and coding expert
 
Posts: 1829
Joined: Thu, 09Jun04 23:00
sex: Female

Re: Dynamically sizing map regions

Postby pH Cockatrice » Wed, 11Aug24 22:05

This is cool! Thanks!
pH Cockatrice
great white shark
 
Posts: 67
Joined: Sun, 11Aug21 18:03
sex: Masculine


Return to Projects

Who is online

Users browsing this forum: No registered users and 26 guests

eXTReMe Tracker