Okay. This is solved. Here is my solution...
It uses one room as an 'endless room'.
This code is pretty rough, so bear with me ... I did this in a seperate 'game' that was just for testing this function. I'm sure I'll refine it a lot before I put it in my finished game, but I wanted to post it as is because I'll probably forget later.
I'm not including the full code of the module, just the relevant parts to make this work.
The basic idea is that you define an 'endless room' ... in this example its 'test2' .... and then you give two properties (x and y) to any room you want to NOT be part of the endless room ... I wrote a procedure that I put into all the exits in the endless room that does all the processing ... you also need to put it into any exit that are in another room that goes TO the endless room ... rooms without x, y coordinates are ignored. (this way you could create several rooms as the interior of a building without them having any impact on the 'endless room'... if you exit from a room without coordinates to the endless room, make sure you use a script to set the global x,y variables correctly otherwise the virtual positioning could be off.) The way it handles objects is to cycle through the list of objects in the room and assign them x and y properties of the current grid point and make them inaccessible as you leave... as you enter it checks the room for inaccessible objects with the current grid point assigned to them and makes them accessible. So objects aren't a problem.
The best feature (as far as I'm concerned) is that this system allows you distribute real rooms anywhere in your 'wilderness' grid just by assigning them grid coordinates and putting the procedure into any exit that goes back to the 'wilderness' ... this has a lot of potential for letting you do things like make spaces between towns without needing to create every single cell... the next step will be to add in barriers (i.e. once you reach grid point -64 you can't go any further west.... and get a message like "There is the grand canyon in your way! you can't go further west!") and sub 'wilderness' ... for doing things like roads ... i.e. specifying another 'endless' room that covers multiple grid points ... maybe do that by giving it sequential x values like 64, 65, 66.... but thats for another time ... what I've got will solve my immediate issues... feel free to improve, use, and do whatever with it.... (if you make significant improvements or add new features, please send me a copy)
define room <test2>
north do <EndlessRoom(n)>
south do <EndlessRoom(s)>
east do <EndlessRoom(e)>
west do <EndlessRoom(w)>
end define
define procedure <EndlessRoom>
for each object in <test2> {
if exists <#quest.thing#> then {
property <#quest.thing#; x=%x%>
property <#quest.thing#; y=%y%>
hide <#quest.thing#> } }
select case <$parameter(1)$> {
case <n> inc <y; 1>
case <s> dec <y; 1>
case <e> inc <x; 1>
case <w> dec <x; 1>
}
set <roomtemp; >
for each room in game if ( #(quest.thing):y# = %y% ) and ( #(quest.thing):x# = %x% ) then set string <roomtemp; #quest.thing#>
if ( #roomtemp# <> ) then goto <#roomtemp#> else {
for each object in <test2> if ( #(quest.thing):y# = %y% ) and ( #(quest.thing):x# = %x% ) then show <#quest.thing#>
goto <test2> }
end define