1

So I am having some issues wrapping my head around the logic behind this. So I have a top down random terrain generator. It works just fine. So what I've done is create 4 rooms, all having the random terrain script run. These rooms are persistent. Also, there are no borders to the rooms and they are in a sphere, if that makes any sense. So, if you are in the bottom left room, you keeping running left and go to the next room, then you will reach the bottom right room.

Everything is working just fine. The only issue I am having is once the player reaches the end of the room, the following room has not been created yet. So the player sees a patch of empty sprites. Then once the player crosses the border and goes to the next room, of course there is a transition. And I'm really not looking for that.

What I really want is for the other room to be present, visible. Then once the player reaches the other room and crosses the border, there is no transition. I just want a fluid movement from one room to the next. I'm just not too sure where to go from there. So I am just wondering if I have th right idea for what I am trying to do. And if I can get some guidance in the right direction.

0cean_
  • 31
  • 1
  • 7
  • No, it doesn't make any sense. Explain what you're talking about. – Math chiller Feb 24 '15 at 00:46
  • Okay, well I have 4 rooms created. All 4 of these rooms have a random terrain generator script. So when I start a new game all the terrain is completely random. This all works. Now all 4 rooms are together almost like a square. So there is top right room, a top left room, a bottom right room and a bottom left room. Now when I leave a room I am sent to the next room correlating to the position of the room I am currently in. Again, this is all working. The problem I am having is transitioning into another room. When I leave the current room I am in I am sent to the next one. – 0cean_ Feb 24 '15 at 02:23
  • And the screen switches to the next room. What I really want is a fluid transition. So in my head I would want the next room to exist. Then once the player leaves the current room and goes to the next, There is no transition. There is no camera switching. It is as if the player just took another step. I don't want that early Zelda style room transitions, which is what I currently have. So I am asking if there is another way to transitions between rooms? – 0cean_ Feb 24 '15 at 02:27

1 Answers1

0

There is two ways to doing this:

1) what you want to do is create two variables using sprite_create_from_screen() (http://docs.yoyogames.com/source/dadiospice/002_reference/game%20assets/sprites/sprite_create_from_screen.html). assign a persistent object a picture of the room you're currently in, switch rooms, take a picture of the new room, de-activate all objects (excluding the persistent one)(http://docs.yoyogames.com/source/dadiospice/002_reference/objects%20and%20instances/instances/deactivating%20instances/index.html), draw the two sprites moving along sideways to make the animation look smooth, then re-activate all objects.

2) Scrap the idea of using four rooms and use one. Make an object that sits invisible in the middle of the rooms (to the player looks like 4 rooms but is technicly one) and make the view follow it, make a trigger for when player reaches the edge of the map and move the view-followed-object to the middle of the next room.

Heat Death
  • 105
  • 9