Multiple Rooms

Get help using Construct 2

Post » Tue Jan 31, 2012 1:33 am

I'm very new to this program. Sorry if this has been asked before, but I looked around and didn't see anything that could specifically help, so...

I'm trying to start out with a basic platformer -- right now a cube that can move about between two rooms. I guess I have two questions:

1) What is the best way to make multiple rooms that one can more back and forth between? (1 layout per room or something else?)

2) What is the best way to send the player back and forth between rooms?

Currently I have two layouts (Layout 1 for room 1 and Layout 2 for room 2). I also have a sprite (Trans1) I made invisible in Layout 1, and when the player comes into contact w/ Trans1 he is taken to Layout 2 like so:

Hero - On collision with Trans 1 --> go to layout "Layout 2"

And on Layout 2 I just moved the player sprite by the entryway to the next room. This all worked pretty well until I was trying to figure out how the player could go back. If I do the same thing with a separate invisible sprite (Trans2), I realized that the player does not appear by the hallway, but rather by the original spawn point (where the game begins). I tried something like this:

Hero - On collision with Trans 2 --> go to layout "Layout 1"
                                   --> Set position to (728,204)

...but that didn't actually more the player sprite to that location, and it appeared in the original spawning point like before.

I feel like there must be a simple way of doing this that I'm drastically overlooking -- any help would be much appreciated! (Hope my ramblings make sense!).

EDIT: Here's a .capx for what I'm trying to do. LINKdacharya642012-01-31 04:14:03
B
3
Posts: 3
Reputation: 306

Post » Tue Jan 31, 2012 4:01 am

I also would like to know an easy and efficient way how to do this...
B
3
Posts: 5
Reputation: 285

Post » Tue Jan 31, 2012 9:20 am

Nifflas did such thing. His solution was to create a level editor. The basic idea is that the whole game world is in an array and the game constantely keep track of your position in this whole world.

Then you just have to update the display (destroy all scene object, create and place the corresponding sprite for the next room) each time you change room. As you know the position of the hero in the whole world you can position him accordingly in your room so transitions match.

But yeah... Level editors aren't easy.

http://nifflas.ni2.se/?page=Knytt+StoriesYann2012-01-31 09:21:03
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Jan 31, 2012 4:00 pm

Thanks. Do you know where I can find a .capx example of this? Even something very simple will do! How does the level editor system become the actual gameplay...?

This sounds like it could get complicated...dacharya642012-01-31 16:03:11
B
3
Posts: 3
Reputation: 306

Post » Tue Jan 31, 2012 5:15 pm

The guy made it on mmf... And yeah it's complicated, but mostly because it's hard to do simple easy to read stuff on mmf.
Basically you store references of object in an array and use these reference and the array coordinate to create the proper object in the proper places.
But if you are new to c2, a level editor might be too much to handle.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Jan 31, 2012 5:51 pm

Hmmm. Is there a good tutorial or an example .capx file that uses this well? Preferably a file; sometimes hard to write a program from a tut. I see there is a Basic Loops and Arrays tut, perhaps I'll start there.
B
3
Posts: 3
Reputation: 306


Return to How do I....?

Who is online

Users browsing this forum: Colludium and 29 guests