Revealing adjacent rooms

scrimshaw04
08 Jul 2017, 14:18

I'm attempting to make a map without using having the lines to represent exits from a room, mostly for aesthetic reasons. Unfortunately the rooms are also all different sizes, so the border/path option isn't quite what I'm looking for either.

Is there any way I could use a script to reveal (or even better, reveal but being slightly transparent) rooms that are adjacent to the player?


DarkLizerd
08 Jul 2017, 20:02

IE:
"you are in a long 40 foot hallway..."
But the hallway is 4 connecting 10 foot rooms and you want to be able to see all 4 rooms at once?

Or is this for the map?
I know you can move the rooms so that they connect together, and you can use shapes, not just the default box, but I'm not sure about showing the connected boxes all at once.


scrimshaw04
09 Jul 2017, 07:55

Yep, I mean for the map. It might not be possible, if not I guess I'll have to find another solution


The Pixie
09 Jul 2017, 12:17

Well it certainly is possible, but not with the built in map. You would need to write your own mapping code and have it do what you want. You would have to be using the desktop version, and you would need to know JavaScript to some degree, as well as Quest coding, and probably HTML and CSS.

The way I would doit is have a set of images, each one showing just one, room withthe rest of the image transparent. Then have them all superimposed on each other to make a complete map.

The bottom of this page might help with that:
https://github.com/ThePix/quest/wiki/Images-Part-01:-Basic-techniques

Once you have done that, use JavaScript to selective show of hide each image, depending on the room you want to show. You could then give an image a opacity of 0.5 to have it transparent.

This would not be trivial...


scrimshaw04
09 Jul 2017, 13:51

Honestly, my knowledge of javascript is pretty limited. Perhaps if I know more one day I can tackle this problem, but for now there are probably more important things to work on. Thanks Pixie


DarkLizerd
09 Jul 2017, 18:13

The map shows visited rooms, right?
How about, when the player enters one for the connected rooms,
you add a bit of code that tells Quest he just visited each of the connected rooms?
This sounds a lot easer than what everyone else said...
(But it could be because my idea won't work... :( )


scrimshaw04
10 Jul 2017, 13:52

That's basically what I was thinking of doing, but I can't figure out if there's a way to reference all of the rooms that are adjacent to the one the player is in. Maybe I could go through all of the rooms in the game and check for any that have an exit to the player's current location?

More importantly, I can't figure out how to make them be revealed on the map. The 'visited' property doesn't seem to do the trick.

EDIT: It seems like I might be able to use Grid_DrawRoom, but I haven't figured out how to use it yet.


hegemonkhan
11 Jul 2017, 02:49

some of these might be of help:

(all are found within the 'libraries and code samples' forum board, there's only 4-5 pages of threads to look through)

http://docs.textadventures.co.uk/quest/functions/index_allfunctions.html (scroll down to the 'grid_' section, it's alphabetically ordered)

http://docs.textadventures.co.uk/quest/showing_a_map.html

http://textadventures.co.uk/forum/samples/topic/5719/guide-remaking-the-default-custom-map

http://textadventures.co.uk/forum/samples/topic/5529/infinite-world-generation-alpha
http://textadventures.co.uk/forum/samples/topic/3546/map-generation-demo
http://textadventures.co.uk/forum/samples/topic/3886/grid-map-fun
http://textadventures.co.uk/forum/samples/topic/5919/map-tiles-extended-improved-room-map-tab-with-all-16-map-tiles

http://textadventures.co.uk/forum/samples/topic/4280/move-to-an-undiscovered-room
http://textadventures.co.uk/forum/samples/topic/3214/path-library
http://textadventures.co.uk/forum/samples/topic/3956/look-at-adjacent-rooms
http://textadventures.co.uk/forum/samples/topic/4822/jqueryui
http://textadventures.co.uk/forum/samples/topic/4410/black-gui