How do I Make Open World?

Get help using Construct 2

Post » Thu Nov 20, 2014 7:37 pm

I have recently thought making a new game after my main computer get fixed. One of the main idea I'm concentrating on is making an infinite open world. I want the player to fully control the world and when he reaches the edge, the game layout just stretch to add more contents and more space in the game. Is that even possible? This idea is inspired by Minecraft where the player just live in infinite world where the world never ends! Since it's 2D not 3D , I just want to add more width to the layout by a global varibable or something. Any ideas? I'll be grateful.
Thanks in advance,
Naji Kadri
Lightbulb Games Studios
ImageImageImageImageImage
B
56
S
15
G
5
Posts: 852
Reputation: 11,436

Post » Thu Nov 20, 2014 9:16 pm

Hi @Naji, would the player be leaving anything behind on his journey? If not you could wrap around and come back into the other side of the canvas.

If he IS then you could still wrap around but use an instance variable (say ShowInWrap) on all of the objects to define which wrap they appear in. You'd also need a global variable (say Wrap)

Whenever you create an object you'd set it's ShowInWrap value to whatever Wrap is at that time.
Whenever your player falls off the edge you increment the Wrap value (or decrement if he's going back again) and only make visible any objects with matching ShowInWrap values.

The above would work for 1D (e.g. a runner going left and right) and if you're wanting infinite 2D then you'd just need to wrap the X and Y separately.

Hope that makes sense.
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560

Post » Thu Nov 20, 2014 9:45 pm

@hundredfold well let's say only the x I want to expand. the layout most expand when the player moves outside the layout from the right side leading the layout to increase as the player moves forward. for example a layout of width 800 pixel is set. the player x position is after the 800 pixels thus adding the layout width size of:
Width = Width + (player.x - width) - example: Width = 800 + (820-800) = 800 + 20 = 820 pixel.
Is that possible?
ImageImageImageImageImage
B
56
S
15
G
5
Posts: 852
Reputation: 11,436

Post » Thu Nov 20, 2014 10:39 pm

Naji wrote:I have recently thought making a new game after my main computer get fixed. One of the main idea I'm concentrating on is making an infinite open world. I want the player to fully control the world and when he reaches the edge, the game layout just stretch to add more contents and more space in the game. Is that even possible? This idea is inspired by Minecraft where the player just live in infinite world where the world never ends! Since it's 2D not 3D , I just want to add more width to the layout by a global varibable or something. Any ideas? I'll be grateful.
Thanks in advance,
Naji Kadri
Lightbulb Games Studios

As far as I understand, you just want infinite scrolling, which can be achieve by setting the layout property "unbounded scrolling" to yes.

however, depending on the result you might want, that could imply to learn how to manage a large number of objects that exists in a lot of places.
..But I think ashley said the next blog post would actually talk about this, he talked about that also in this page: feature-addition-quot-room-object-quot_t119364?start=30

However be sure to have the knowledge to read it and mainly understand it correctly (sentence for every necomer that may just stumble upon this thread).
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri Nov 21, 2014 8:06 am

Thanks @Aphrodite, I'll look forward to that.
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 38 guests