textadventures / quest

Create text adventure games
http://textadventures.co.uk/quest
MIT License
304 stars 69 forks source link

Quest 5.6.2 - Ingame map cannot handle thirteen floor building #838

Closed greysondn closed 8 years ago

greysondn commented 8 years ago

Why do I have a building with thirteen floors? Better question: What were the odds someone wouldn't sooner or later cash in on that cliche for a horror piece?

When I get to a certain height, the game gives me the following error:

Layer out of bounds. Current Layer Range: -3 to 3

The building is arranged such that the floor order is Ground, 1, 2, 3, ..., 11, 12, 13. The error happens during the transition in between rooms arranged as a stairwell between floors 3 and 4. After the command to go up is entered, but before the title and description of the room is shown.

Proposition: The default "ground" floor for projects is 0, which means that you can have as high as floor 3 or as low as floor B3 before encountering this problem. A way to extend the limitations or a fix would be appreciated; there is no reason for an arbitrary limit that I can foresee (within the bounds of memory). Ideally, simply not having a limitation at all would be best.

greysondn commented 8 years ago

Update: A friendly user in a community I frequent found the exact line this error is thrown.

https://github.com/textadventures/quest/blob/9641b69d8ea9fc821514c71b08d88060f0b765ca/PlayerController/grid.js#L37

/PlayerController/grid.js, line 37

alexwarren commented 8 years ago

@Cylius-Optimi The commit referenced by this issue looks good, but it doesn't appear to be in the main branch. In fact I'm a bit confused about where it is exactly, because it's not showing up as one of your forks either? Are you able to send a pull request with that change included?

Cylius-Optimi commented 8 years ago

That's incredibly odd; my fork seems to have disappeared. I'll fork it again really quick and send another pull.

As an addendum, I'm sure we could make the layer limit higher, but we should first see how the performance is when all 15 are in use.