Questions about mapping offsets and positions

TinFoilMkIV
I've been playing with the mapping feature in Quest lately and came across some issues I haven't been able to find solutions for and figured I'd ask around.

It seems that under default settings the mapping functions don't play nice with unrealistic/impossible room layouts, and as an extension not working well with looping room sequences. The problem is that the map moves the player indicator exactly as your directional input would expect them to move without regards to the actual locations of the rooms. Then on top of that it will flat out stop drawing any room you enter a second time if the expected new location doesn't line up with the original location you encountered that room at.

For example, the setup I was playing with involves an L shaped hallway and 3 rooms, one at the corner and 1 at the end of each hallway. The end rooms have an up/down exit into eachother. When the player moves east initially then travels down , then north back to the intersection, they end up in the starting room, however on the map they are just north of the n/s facing hallway in a room that isn't displayed on the map, since the map is still showing this same room at the starting location. Then if you continue to follow the rooms forwards you end up way off the drawn map. Additionally after going up/down more than 3 times I start seeing errors telling me that the layer is out of bounds every time I move.

Honestly I can work with this as a limitation if there is a way to essentially reset the map, as in clear everything and set the players position back to being 0, 0, 0.


The other odd thing I'm running into is with the map position offset of a room. For one this only seems to work when a room is a child of the base room, but the offset seems to be a one way effect, causing the player to become misaligned with their map quite easily, as you will move with the offset while move from parent to child room, but when moving back the player moves as if the parent room was connected normally to the exit back. And since a parent/child relationship is one way (to my understanding), there doesn't seem to be a way to resolve this without modifying the actual code that controls the player location on the map.


Ultimately what I'd like to be able to do is create a map that can be reused but may appear in different locations relative to where the player may be entering it on more than one occasion within the same playthrough. I can work with needing to assemble the rooms and their positions manually, but I do need to be able to keep the player aligned with the correct mapping position as well as be able to redraw a room a second time in a new location. Having to completely clear the map isn't an issue but I haven't been able to find any information on how to accomplish that.

XanMag
Not sure if this might be helpful, but if I'm interpreting your intentions correctly...

When you try the down exit from the end rooms, could you run a script and simply use the 'move object' option in GUI to move player object to the other end of the hallway? That way there is no 'physical' connection on the map?

And maybe I missed this part in my understanding, but by reusing that segment of the map, do you want the exits to be different (especially that corner room) when reusing it or are all the exits the same?

XanMag
I think it's an identical section after reading again. If so, the 'move object' player to desired room should work. If you need to have an exit lead to different locations at different times, you can still do this, but you'll need flags in your script with if statements.

Let me know if this helps or if you need clarification. If not, you'll have to wait on an experienced coder. Good luck! :)

TinFoilMkIV
Hmm, I actually haven't experimented with hard coded move commands instead of the default exit functionality. That could potentially work, altho to be quite honest I've just about abandoned this method as it will probably end up being too messy for what I'm attempting.

Anyways here's an image of some auto mapping wierdness. I colored the end rooms with the up/down connection for clarity.

first frame is the basic room layout displayed normally in one layer.
second frame is what happens if you try to follow the hallway (note its faded out because I'm a few floors above the mapped rooms)
third frame is starting from the intersection, mapping out all the rooms in one direction then backtracking past the start.

The original plan was to use prebuilt zones to create a psuedo randomly generated type world, where you could encounter a specific type of area more than once, or even the same area (although technically both would the be using the same rooms, just one instance would have new stuff put into it) encountered from another location that shouldn't physically align with it. I think the scripted exits instead of relying on default exit functions could probably pull this off the way I was thinking, but for the moment I'm going to be dropping the mapping aspect in favor of an explore/travel system.

I'll try messing around with this some as it certainly won't hurt to have more options down the road and it's good practice. Although it would still run the problem of not being able to re-use rooms as I haven't been able to find a function to clear out a location from the maps memory.


EDIT:
after a quick experiment, map movement appears to be based entirely on the direction of the exits "type" and the basic map exit/room sizes. You can script yourself to any room you want, the map is going to put it right in the direction the exit type says it is, with no regards to how any of the rooms line up, including the one you just came from. I set the one direction as an "in" exit with backtracking being "west" and immediately went through a wall and off the map.

Also setting it as a "non-directional exit" throws a bunch of errors with mapping turned on.

EDIT2.0: even using manual offsets draws the room wherever you encounter it even coming from a room that isn't the parent and should be aligned normally while causing some really weird map movement.


EDIT:(again)
the Move function the GUI editor uses is a bit better but can still get broken. It seems to move the player based on some kind of estimated location relative to the room your in and doesn't actually align you with any kind of room if you get too much weird movement going on. I think the main thing that broke it in mine was the manual room offsets, but having doubts about how a large zone will map out with impossible exits.

HegemonKhan
I think Jay has done some work on this stuff (though maybe not exactly of what or everything that you want):

viewforum.php?f=18 (more guides: Libraries and Code Samples)

viewtopic.php?f=18&t=3886
viewtopic.php?f=18&t=3546
viewtopic.php?f=18&t=4280

ask~pm Jay, as he's very knowledgeable with the mapping~grid stuff

and here's some other links too:

http://docs.textadventures.co.uk/quest/ (quest wiki's main page)

http://docs.textadventures.co.uk/quest/ ... notes.html
http://blog.textadventures.co.uk/2013/1 ... available/
http://blog.textadventures.co.uk/2012/1 ... available/
http://blog.textadventures.co.uk/2012/0 ... quest-5-3/ (check out this link, detailed info on the mapping~grid feature)
http://docs.textadventures.co.uk/quest/ ... /exit.html (this is on Exits and maybe some Attributes for the map~grid ~ I've not worked with the map~grid at all, still a total noobie on this map~grid stuff)
http://docs.textadventures.co.uk/quest/ ... tions.html (see the 'G ~ Grid_xxx' section)

TinFoilMkIV
Thanks for the info. I had already looked through most of it but still good references.

That map generator that Jay got working actually looks pretty interesting, although to be quite honest it's probably a good thing I didn't get ahold of that earlier. At this point I probably need to be simplifying things instead of over complicating every single feature I'm working with, already got enough of that planned, heh.

XanMag
I feel that pain... "oh, I'll make a simple yet clever game..." And it doesn't take long... Argh!! Another issue I can't solve?!! But, the fun in this is pushing beyond the obstacles and making a hell of a game! I look forward to what you are producing!

Good luck and happy gaming!

ty13r
I need an easy way to reset the map in between parts of a large map, so older sections that were visible are no longer visible, is this possible?

The issue is we've implemented portals and the portals throw of the position of all the rooms relative to one another.

HegemonKhan
here's a link for the functions/commands for map/grid:

http://docs.textadventures.co.uk/quest/ ... tions.html (scroll down to the 'grid_xxx' stuff: it's in alphabetical order)

------

I haven't really worked with the grid/map stuff yet, so I don't really understand this stuff yet, but I'm guessing the toggling of the 'custom_layer' might work, and/or if toggling the display of the map/grid is different, then that would probably work.

I think you basically have to clear the map, and redraw it for when you're 'warped' to a new section (or "vertical" game levels/location movement) of your game.

http://docs.textadventures.co.uk/quest/ ... quest.html (I beleive there's some kind of request command using 'show/hide' for the grid/map)

----

there's some guides on advanced map/grid (and pathfinding) work by Jay and maybe Pixie too, that probably answer this question of yours:

viewtopic.php?f=18&t=3546 (Map Generation Demo by Jay)
viewtopic.php?f=18&t=3886 ('Grid Map Fun' by Jay - not sure exactly what it entails but probably some cool/useful grid/map work stuff)
viewtopic.php?f=18&t=4280 (how to deal with moving to an undiscovered/non-'visited' location/room)
viewtopic.php?f=18&t=3214 (pathfinding by jay)
viewtopic.php?f=10&t=6337&p=42857&hilit=grid#p42854 (see the link for Pixie's 'Deeper' D&D-like game)
viewtopic.php?f=18&t=5919&p=41032&hilit=grid#p41032 (Map tiles extended by Cylius_Optimi)
viewtopic.php?f=20&t=5745&hilit=grid (can read all posts, but the main one is Jay's)
viewtopic.php?f=10&t=5758&hilit=grid (just make sure to ignore my post in the thread as I was wrong, lol)

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

Support

Forums