How do I make smooth transitions between layouts

Get help using Construct 2

Post » Mon Aug 25, 2014 4:10 pm

Anyone know how to make a transition between levels/rooms like in the original NES Metroid?

http://game-oldies.com/play-online/metr ... tendo-nes#

Here's a link to play it if you don't know what I'm talking about.

I want to know how to make my character move to the next layout in front of the door upon colliding with the door,
upon which the transition sets in and the player character is moved to the front of the door in the next/previous layout after the transition finishes.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Fri Mar 27, 2015 8:04 pm

My guess would be that multiple layouts are not the tool you might be looking for in that case, but rather have one layout for, lets say the entire brinstar region, lock the camera inside the current room, and when you go through the door, samus stops inside the door, the camera moves from the current room to the other and locks inside it, then samus goes to the other side of the door, however if the ennemies continues to move, you might have the risk of them going inside the door and hurt you (which happens actually in the first metroid sometimes, not complaining but that was buulllllll*hit).

Doing this however requires to manage ennemies and items carefully so the game does not have too many things to compute (being inspired by the original metroid on those choices can be a fine idea.), and I will admit this is not something C2 helps a lot with (Being able to scroll from one "layout" to another would be easier, but it is not possible).
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Fri Mar 27, 2015 8:44 pm

Aphrodite wrote:My guess would be that multiple layouts are not the tool you might be looking for in that case, but rather have one layout for, lets say the entire Brinstar region, lock the camera inside the current room, and when you go through the door, Samus stops inside the door, the camera moves from the current room to the other and locks inside it, then Samus goes to the other side of the door, however if the enemies continues to move, you might have the risk of them going inside the door and hurt you (which happens actually in the first Metroid sometimes, not complaining but that was buulllllll*hit).

Doing this however requires to manage enemies and items carefully so the game does not have too many things to compute (being inspired by the original Metroid on those choices can be a fine idea.), and I will admit this is not something C2 helps a lot with (Being able to scroll from one "layout" to another would be easier, but it is not possible).



My one of my attempts was to use zone-based camera movement but it was impossible to make an area that had both horizontal AND vertical movements (i.e. one shaft is just horizontal, another is vertical) in the same room because it would break immersion, could be glitched by walking back and forth (so the camera is constantly switching zones) and such. So if I did revert to that, I would have to very carefully design the rooms not to include such things.

As for stopping in the doors, I just made it so that when the player is overlapping the door, it disables controls and simulates the player going in the current direction and the door closes behind him. E.g. if he's facing left when he walks in the door he goes left.

I remember that, it was really annoying to get into a room with Flyers (the ones that fly out of pipes) only to get killed when the room is transitioning.....


An event like "Play is overlapping Sprite Room X | Destroying Enemies not overlapping Sprite Room X" would control deleting enemies the player is not in. While something like "Play is overlapping Sprite Room X | Restore Enemy (Family) Overlapping Sprite Room X".
But I doubt the actual would look exactly like that.

Trivia: You know the new System actions "Reload Layout X1, X2, Y1, Y2" and "Restore Persistent Objects"? I started the thread and was among the people who got ashley to make it. They were actually put into Construct 2 for this exact reason.



Thankfully, Construct 3 will have an Editor SDK, so multi-layout connections could be possible.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Fri Mar 27, 2015 9:15 pm

I was Challenged :mrgreen:


capx


I used 3 layouts here, and you can use the platformer to walk either left or right in a loop of layouts.

The doors are close to the edge, it would just require some smart level designing to make it look better, some things from the beginning of the level would need to be on the end of another level. If you make everything relative to the doors with positioning, you are likely to get away with a short blink or flash in the screen.

As for enemies and objects following you at a distance ... that just takes some smart procedural approach.

All in all, the mulit layout transition, smooth, is something which is likely not the intended working of levels and layouts ...
In some of my games I simply use a fade out to black, load other layout which starts out with a black layer, and fade the black away again.


For what your desiring to work, I would design really big levels, like 10k , 10k, which would not need transitioning.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Fri Mar 27, 2015 11:43 pm

add effect brightness to both layouts.

then add 2 global variables - brightness and transition

on first layout on layout started - set brightness variable to 100 and transition to 0

on first layout when you want to change layouts instead set this:

set variable transition to 1

make an event that does this:
if transition = 1
subtract from brightness 1
set effect brightness param 0 to brightness (variable)
(subevent)
if(brightness=0) - > go to layout 2

and on layout 2 - set variable brightness = 0 on start
if ( transition = 1 )
brightness +1
set effect brightnes param 0 to brightness (Variable)
(subevent)
if(brightness=100) transition = 0

something like this should work, around 1-2 sec fade, depending on your fps.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,455

Post » Fri Mar 27, 2015 11:50 pm

lennaert wrote:I was Challenged :mrgreen:


capx


I used 3 layouts here, and you can use the platformer to walk either left or right in a loop of layouts.

The doors are close to the edge, it would just require some smart level designing to make it look better, some things from the beginning of the level would need to be on the end of another level. If you make everything relative to the doors with positioning, you are likely to get away with a short blink or flash in the screen.

As for enemies and objects following you at a distance ... that just takes some smart procedural approach.

All in all, the mulit layout transition, smooth, is something which is likely not the intended working of levels and layouts ...
In some of my games I simply use a fade out to black, load other layout which starts out with a black layer, and fade the black away again.


For what your desiring to work, I would design really big levels, like 10k , 10k, which would not need transitioning.



Anyone can do that, you just made it look identical. It's simple with a simple design like that.
Not to mention it's not seamless, there's flickering when the layouts change.

I said like the original Metroid, get some enemies in there crawling around and make it look like one giant room.
You only switched the layouts, anyone can do that.

EDIT: There's no scrolling in the transition either. 0/5.
EDIT: Not using a global player.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Sat Mar 28, 2015 2:06 am

There ya go, that actually looks decent already


capx


edit: updated it, shoot with space, bullets get transferred too, and theres a tree manually placed.


Nesteris wrote:I want to know how to make my character move to the next layout in front of the door upon colliding with the door,
upon which the transition sets in and the player character is moved to the front of the door in the next/previous layout after the transition finishes.


My capx did just that ... and some extra.

I think the current slight shutter can be treated as a small dip in frame rate, and likely neglected. You could add a slight flash or dark, or perhaps just some simple loading sign distracting from the stutter ...
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Sat Mar 28, 2015 3:40 am

Good for you @Lennaert , I believe you won the challenge .
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Sat Mar 28, 2015 2:02 pm

@lennaert

It's fairly basic and there's no scrolling (not the hardest thing to add), but yup, you did win. Final Score: 90%

Now I get to apply it to my game :mrgreen:
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Sat Mar 28, 2015 2:44 pm

For the scrolling I would just use a bullet on the player, force him to move in either direction :) (keeps it simple)

I must say I was intrigued by the effect and the potential this technique has.

As for performance, all assets are already loaded, just not everything rendered, if you keep it easy with how much you let appear in 1 tick on the new layout, you should be fine :)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests