How to Create Multi-Room Layouts For a 2D Game Using Arrays

4

Index

Stats

1,915 visits, 5,123 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY-NC 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 16 Nov, 2022.

The Array starts with dimensions (0,0,0). Since Construct uses a 0-based counting system, this means that the array is 1 unit in every dimension. What that means is that the array contains only one available cell. But we are about to change that!

First, you need to decide how wide you want the entire area of your game to be. This is different from the size of the layout--we will come to that later. What I mean here is that you must decide how many rooms wide you want the entire game to be. In other words, if the player walks all the way from the farthest left point they can reach to the farthest right point they can reach, how many rooms will they go through? Remember: each cell represents one single room.

When you've got that figured out, decide how many rooms tall you want the area to be--if the player walks from the top of the map to the bottom, how many rooms will they go through?

When you have decided both of those numbers, go to the Array Editor and set your array's width and height to the numbers you chose.

Optionally...

If you would like your game to have multiple floors (for example, if it takes place in a tall building), you can set depth as well, to as many floors as you want your game to have. In the castle game I am developing, there are 4 floors.

Once you have your array's dimensions figured out, you can now start...

  • 0 Comments

Want to leave a comment? Login or Register an account!