How do I make multi rooms

Get help using Construct 2

Post » Mon Mar 19, 2018 8:09 pm

Hello,
In my game I move between rooms, I have HP, Armor and more variables.

I was wondering what is the best way of making multi rooms, should I make more layouts? is there any other way?
If I need to create more layouts, how do I save all the stats?

Thanks!
B
7
S
1
Posts: 17
Reputation: 411

Post » Mon Mar 19, 2018 10:36 pm

Layouts are a good way to make rooms. Familiarize yourself with the "Global" property and "Persist" behavior, which you can read more about in the manual.

An alternative way is to build all your rooms on one layout in a separate area, and teleport your player sprite around.
Mistakes were made.
B
60
S
30
G
132
Posts: 1,931
Reputation: 74,339

Post » Mon Mar 19, 2018 11:49 pm

oosyrag wrote:Layouts are a good way to make rooms. Familiarize yourself with the "Global" property and "Persist" behavior, which you can read more about in the manual.

An alternative way is to build all your rooms on one layout in a separate area, and teleport your player sprite around.


Alright, thank you for your suggestions.
May I ask what are the cons and pros of each method?
B
7
S
1
Posts: 17
Reputation: 411

Post » Tue Mar 20, 2018 1:06 am

Layouts allow you to manage your graphical memory, only sprites that are used in any particular layout are loaded into memory. It will allow you to have a greater variety of textures between layouts.

Having everything on a single layout might be simpler to execute, but you might run into memory limitations. Depends on the scope of your game.

Also "time" does not pass across layoyuts, which may be a consideration.
Mistakes were made.
B
60
S
30
G
132
Posts: 1,931
Reputation: 74,339

Post » Tue Mar 20, 2018 2:05 am

oosyrag wrote:Layouts allow you to manage your graphical memory, only sprites that are used in any particular layout are loaded into memory. It will allow you to have a greater variety of textures between layouts.

Having everything on a single layout might be simpler to execute, but you might run into memory limitations. Depends on the scope of your game.

Also "time" does not pass across layoyuts, which may be a consideration.


Alright, thanks for the great answer!
Except "time" which isn't a problem for me, are there any more limitations?
B
7
S
1
Posts: 17
Reputation: 411

Post » Tue Mar 20, 2018 3:05 am

Basically layouts is the proper method.

But you can get away with teleporting if your game is not too large, which could be a lot simpler to implement.
Mistakes were made.
B
60
S
30
G
132
Posts: 1,931
Reputation: 74,339

Post » Tue Mar 20, 2018 7:08 am

oosyrag wrote:Basically layouts is the proper method.

But you can get away with teleporting if your game is not too large, which could be a lot simpler to implement.


Thanks!
B
7
S
1
Posts: 17
Reputation: 411


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests