Maps

Vayde
19 Feb 2012, 22:33
Hi Alex and all, thought I would start my journey with you with a question :)

Do you have any plans for an auto map function to be added?

By this I mean rather than doing it the proper way with pen, pencil, crayon and paper, the game creates a simple graphical map with very simple room names and connection's.

From my days with the TRS 80 and later the Vic 20 and Com 64 I've been an avid text adventure player. I loved Scott Adams adventures and the Zork trilogy and still have all of my hand drawn maps from then.

As I'm now getting on a bit the thought of drawing out countless octagonal grids on at least three levels leaves me a bit cold. I have produced a printed version of said blank maps but have always yearned for the graphical equivalent.

Should this not be a future plan or any plan for that matter, it still won't stop me recreating my first ever adventure which used GWBasic and was inspired from the excellent INPUT multi part collection series.

Thanks for all the hard work you and the fans have done so far, I look forward to getting to grips with Quest over the coming months...

Alex
20 Feb 2012, 09:23
This is a planned feature: http://quest.codeplex.com/workitem/866

It's going to take a bit of work to get right though, as it would have to work nicely on both the desktop and the web, ideally without too much duplication of effort.

Also it's a bit complicated because there are up/down and in/out directions, so an octagonal grid is not quite sufficient. In addition you can create an exit north from room A to room B, but you don't have to have an exit south from room B to room A - it could go to room C instead.

So this means the map probably can't be entirely automatically generated. The solution is probably to have a map designer in the Editor, which will let the author click and drag rooms around in a way that makes most sense. Then, in the Player, render the map but only with the rooms that the player has visited.

MerchantToo
20 Feb 2012, 15:20
I was playing around with an idea for having a map in the game, and came up with the following. If you draw the map yourself (e.g. in photoshop, or GIMP as I used), split the room up into transparent .png files, it will then overlaying the map parts on top of one another gives you a built up map. I've added an object type mapview, which then needs to be added to new rooms. It adds a naming convention and overrides the firstenter property to add the room's name to a list of visited rooms. This list is passed into a javascript function when "map" is given as a command. The javascript then overlays all the maps parts of it knows have been visited.

The files enclosed are a very simple, hand-drawn four room example:

Other than automatically creating a world map from standard items, this gives the designer a chance to make his own style of map, and also avoids any problems to do with alignment, e.g. how to deal with up and down. It does however require the designer to be more visually capable as you need to do some drawing yourself. As you can tell from the graphics - I'm no hero in that department. I've left a debugging notice in there, which prints the known visited rooms.

If anyone would give me some tips on improving this, I'd be grateful. I don't know how to make the screen look more visually pleasing, as the map is printed in a fixed position. If you type too many commands then you: i) type over the map ii) a certain point it starts to scroll up. Any ideas - and this is the first piece of javascript I've every written, so don't make the learning curve too steep for me please :D. Also "opacity" only seem to work in a real browser, not is the quest browser.

Pertex
21 Feb 2012, 21:06
Hej, great idea, MerchantToo :!: :!: :!:
I took you game and changed it a bit. I dont need Javascript any more, instead I used this wonderful top frame, which can be misused to display lots of pictures :D
There are no ways displayed now and there is still a problem with z-index, the order of displaying overlapping pictures.

Alex, there seems to be a memory leak when displaying pictures. Start the game, type 'map' and then restart the game. Do this 3 or 4 times (typing 'map' and then restarting the game) and Q5 freezes. Perhaps you could have a look at it?


oh, filesize is delimited in the forum. Then you have to copy all files from the two zips into one directory.

Pertex
21 Feb 2012, 21:07
Here is the second file.

MerchantToo
22 Feb 2012, 17:18
Nice. I like this too. I was thinking about a way of displaying characters in rooms as a part of my game, and this would also be a way of doing that. I have a graphic for each of my rooms, and whenever an event occurs I could update the overlays with the character icons/pictures. I just need to do some automagic placement, but that pretty easy. Still wondering whether to go with javascript on this one? That may allow some kind of animation effects or for text to appear when hovering above a particular character, but I shouldn't get carried away...