Legacy GM [SOLVED] Transition between randomly-created rooms...?

A

AtomicToilet

Guest
Hey folks!

I recently followed Heartbeast's tutorial on randomly-created rooms/dungeons, and understand the majority of it well enough, but what's stumping me is: how to allow the player to move between rooms?

I understand/use the
target_x
target_y
target_r

code in my other prototypes, since in those the rooms are set, so it's possible to alter the 'warp' x/y points accordingly. But, in the case of this type of game, how can I get my Player to use a 'warp' point if the room they're off to isn't generated yet...? Should I be trying to use a completely different 'warp' code?

Sorry if this is painfully obvious - I've had a few months away from using GM so I'm a little rusty :rolleyes:

edit: just thought, it might help to say that I have the room code generate just one of a 'Warp' object, which the Player can interact with to, ideally, initiate the room transition.
 
K

Kuro

Guest
The thing you linked to is something like a 7 part video series. So without watching any of it beyond the first video I'm just going to take a wild stab in the dark and you can decide if my suggestion is relevant or not.

Assuming your level generator is adding a warp point that's clearly distinguishable as being the entrance warp point (as in it is differentiating it from the exit warp point), then just after the level has been generated you'd change your player's x, y to be the same as the entrance warp point x, y.

If you're asking how do you send them to a warp point that doesn't exist bcause it hasn't been generated yet? You have several options of which I'm just going to suggest two possibilities.
Either: 1. When the player hits the exit warp point, create a screen transition to hide the generation that's going on, and regenerate a new room in the room you're in, then move player to entrance warp point..
Or 2. Have two rooms that generate random dungeons and alternate between them every time you warp. So to the player it looks like they are travelling to a new level each time but in reality they are bouncing between two rooms that are randomly generating new dungeons. So all you'd do when they hit the exit warp point is send them to the other room, and once it had finished generating you'd move the player character to the entrance warp point.
 
Last edited by a moderator:
A

AtomicToilet

Guest
Cheers for the prompt reply, Kuro!

Option 2 is kind of what I've been doing in the meantime, or rather, I've had the player interact with a single Warp then go to the next room, which is randomly-generated, and so on.

I suppose what I was asking, at the core, is if there's a way of having a Warp point send the player to a specific room (not just the next one) and/or point in a room, but I think I was too caught up in trying to make existing code fit into this new way of doing things, that your suggestions have made me realise I don't really need to worry about that. Instead, I guess I can tweak the level generation code for the 'start' and 'end' rooms, rather than worry about changing it for each individual room.

BASICALLY: Having an Entrance and Exit point in each room is a great idea, and so bloody obvious I'm facepalming haha

Cheers again!
 
Top