How do I recreate this in Construct 2?

Get help using Construct 2

Post » Wed Nov 12, 2014 1:45 am

-Don't move the door. Instead, make a dummy object and set its timescale to 1 at the start of layout. Then, set the game time scale to 0 at the start of a room transition, and move scroll x/y by 120 * Object.dt during a room transition. This will allow the camera to move while the game is frozen.

-You position the player after room transitions based on door ID's. In your example, both doors would share the ID of 0. If there were 2 more doors, they would share the ID 1. This way the player knows which door to come out of, and which door the camera should focus on immediately after the transition.

-Without a mini-map defining room/layout connections you'll have to tell each door which layout to go to.

Anyhow, not to be discouraging but I stand by what I said about C2 not being good for metroidvanias. Using separate layouts for each room means you have absolutely no "world reference" unless you draw out your map beforehand and label each room, or create a mini-map like I did. However, the mini-map only shows you so much. It is also extremely difficult to collaborate on the world map as everything in C2 is completely internal. Multiple people working on hundreds of rooms via SVN is truly a nightmare.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Wed Nov 12, 2014 3:32 am

a cheap and dirty way to do it would be to use an additional layout, one that is simply a black background and the tube would move from one side to the other, you could think of it as a transition layout

- run into the tube.
- transition out the first level
- load the transition layout
- transition finishes
- load next level.

I would use LiteTweento move the Pipe across the level

As for the screen fading to black, I normally use a layer that has a black background and transparency turned off, then just set the opacity. Yet again, you can use LiteTween to do all the dirty work on this task as well.

Hope that helps
B
10
S
3
Posts: 46
Reputation: 820

Post » Wed Nov 12, 2014 4:05 am

Looking at the event sheet, the player couldn't be placed correctly at say, the starting level because "At start of layout" applies to all layouts.
The only fix for that I can think of right now is to use an invisible door without collisions but that could interfere with other doors?

I just spent a while rigging that .capx you send, thanks by the way. I got him to spawn properly in front of the door, sort of. And to get him back the other direction but I can't get the door animating working that way, no idea how you made it do what it does.

How are we supposed to fix placing an initial spawn point? Also this seems like it would be incompatible if we put in save points.

Here's the .capx I've quasi-worked out:

Transitioning Half Done.capx


-Don't move the door. Instead, make a dummy object and set its timescale to 1 at the start of layout. Then, set the game time scale to 0 at the start of a room transition, and move scroll x/y by 120 * Object.dt during a room transition. This will allow the camera to move while the game is frozen.


@Tokinsom Can you show me in the .capx I just put up for download? Also considering that reply I can kiss my chances of you sharing your Metroid engine with me goodbye, right?

By the way, not having a "world reference" can help increase the difficulty and force players to remember the good old times where they had to draw maps on paper to know where they're going.

Also Construct2 seems great for Mega-Man X type of games.
You do not have the required permissions to view the files attached to this post.
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 » Wed Nov 12, 2014 5:13 pm

I meant no world reference for you, the developer. All you're going to have is a gigantic list of layouts with no idea where each one is placed on the world map, and no idea what they look like since you can only view one at a time.

And sorry, but no, I am not giving out the .capx to anyone. Too much time and effort went into all of that to just hand it out. It also uses a fair amount of custom art that we don't want other devs using. I don't mind giving tips and pointing you in the right direction to build your own. This is only the first few steps in building a metroidvania anyway so it's best to have your own engine you fully understand.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Wed Nov 12, 2014 7:27 pm

Fair enough, I respect that.

In any case, would you have time to make a .capx with playerholders showing the example below?
-Don't move the door. Instead, make a dummy object and set its timescale to 1 at the start of layout. Then, set the game time scale to 0 at the start of a room transition, and move scroll x/y by 120 * Object.dt during a room transition. This will allow the camera to move while the game is frozen.


I don't really get how to do that, whatever I did it didn't work so the transition was just instant. I feel so stupid looking at the answer directly in front of me yet not being able to do anything about it.
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 » Wed Nov 12, 2014 8:18 pm

Nesteris wrote: And to get him back the other direction but I can't get the door animating working that way, no idea how you made it do what it does.

How are we supposed to fix placing an initial spawn point? Also this seems like it would be incompatible if we put in save points.


Well you have "Go Right" and "Go Left" for the door directions, that's ok. 0 degrees is right, 180 is left. You just need to check when the door reaches the edge of the screen. ViewportLeft(layername) gives you the x position of the left side of the screen and ViewportRight(layername) gives the right side.

As for the initial spawn point maybe give the player an instance variable that tracks which door he came through.
- Player has an initial door id = -1
- Connected doors have the same id
- Player goes through door and stores door id
- On next layout, player is positioned next to the door with matching id, unless id = -1
- At a save point you can set the player door id to -1

I've never played Metroidvania so I don't know if you have multiple doors per level or what else you need.
You do not have the required permissions to view the files attached to this post.
Last edited by ramones on Thu Nov 13, 2014 9:35 am, edited 1 time in total.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Thu Nov 13, 2014 3:33 am

Don't move the door. Instead, make a dummy object and set its timescale to 1 at the start of layout. Then, set the game time scale to 0 at the start of a room transition, and move scroll x/y by 120 * Object.dt during a room transition. This will allow the camera to move while the game is frozen.


Can anyone explain this to me? Maybe make a post showing the events? Trying to do this but failing.

Here's my attempt:
Following Tosinkom.capx
You do not have the required permissions to view the files attached to this post.
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 » Thu Nov 13, 2014 1:26 pm

Your code is wrong.

-Set Scroll X to ITSELF + 120 * dummy.dt. You were basically setting it to 120 every tick.
-You got the lerp() parameters mixed up: swap x and b.
-Remove the scroll-to behavior from the dummy object.
-Make the dummy object global.
-Make sure both layouts are using the same event sheet. Better yet, make every layout use a "GameRoom" event sheet and "include" a room transition sheet in that one.

https://dl.dropboxusercontent.com/u/105 ... ing_1.capx

This should get you back on track.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Thu Nov 13, 2014 5:38 pm

roomtransitionsthing_2.capx


Honestly I give up, I can't do this and I doubt I'm going to figure it out.

I'm going to use either @ramones version or change my game to make it stage based.

Thanks for the help everyone?
You do not have the required permissions to view the files attached to this post.
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 » Thu Nov 13, 2014 5:57 pm

Just out of curiosity, but why don't you use magicam plugin? I believe it does this type of camera transition. Not sure though.
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Previous

Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 12 guests