Dynamic, realtime map placement (not using the questmap)

I'm setting up a "no man's land"(NML) in between the trenches of two opposing factions.
The NML will be around 90 different rooms with the same alias.
That's the background to my question...

... and it leads up to this.
When the player types "map"... a map pops up
(using this code.)

SetFloatingImage = function (image) {
  var pane = $("#floatingImage");

  if (!pane.length) {
    pane = $("<img>", {id: "floatingImage"}).appendTo("#divOutput").css({position: "fixed", right: 20, top: 50});
  pane.attr("src", image);

(Thank you MrAngel for that!)

The million dollar question:

  1. Is it possible to create some sort of coordinate system based on where in NML the player is at the moment?
  2. Is it possible to make the game draw a red dot ON the map (above) corresponding to where the player actually
    is in NML?

The alternative, as far as I know, is to make one identical map for each "room" (or part of NML) and have the red dot in different locations and then load the corresponding picture depending on the whereabouts of the player.
This is something I'd do if what I'm asking is not possible. However, it would make me a super happy camper if I didn't have to do it this way 'cause... you know... 90+ images... gah.

So... possible? Not possible?

You are opening a can of worms, just so you can't say no one warned you in advance.

Quest keeps track of coordinates if you enable the map, so to easily solve number 1:

1. Set game.gridmap to true

2. Add this to game.inituserinterface: JS.ShowGrid(0)

Now the map is hidden, but you can still use the game.pov.grid_coordinates dictionary.

As for the second part of the million dollar question, you can probably use CSS to position an image of a red dot wherever you like, even over an image of a map. This is beyond me, but Pixie and mrangel know how to do it (I think). (They may or may not be able to make the coordinates from the script dictionary work, though. Quest uses exits to map the world, which sometimes exacerbates things.)

Check this out, Cheese!

Forgot to reply after your first post in here KV. Sorry about that!

First part of he question:
Second part:
I've actually seen that page before. It seems to be a nice way although way, WAY, over my head. Figuring out how to implement that thing with the coordinate system of quest. Maybe next year. :)

Guess I'll fire up photshop and get started on my gazillion map images instead.

New question
Is there a way to make a quest game preload stuff at the start? (such as music... or a gazillion map images?)

"Check this out, Cheese!"

Okay, so I'm the kind of girl who likes to jump in way over her head! So, am I right in guessing that "Star 1", "star 2" etc, are rooms in a 'Text Adventure' type game? Because if that's the case, I may have just found a new hobby! Of course, I may have misspelled 'addiction' as 'hobby', but whatever!

Check this out, Jennifer!

Check this out, Jennifer!

I have uploaded the code, in case anyonewants to take a look.

I have uploaded the code, in case anyonewants to take a look.


Pixie, you are THE MAN!!

(I never thought I'd say something like this ever, but I really hope that the pixie is not a girl.)

This topic is now closed. Topics are closed after 60 days of inactivity.