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

4

Index

Stats

1,230 visits, 3,712 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.

Your Array will probably be rather large, but it's still empty because we have not added any rooms yet. So how do we do that? To start, pick a cell anywhere in the array to be the player's spawn room. Try to pick one closer to the center, because if you pick one too close to the edges then the player will only be able to go very far in a couple directions. For example, if you set their spawn room in the bottom left corner, they will only be able to travel up and to the right.

Once you have decided where the player will spawn, we get to the important part: naming the rooms.

For the spawn room, you could name it "spawn", or you could name it literally anything else. It doesn't really matter as long as it makes sense. For example, the spawn room in my game is named "dungeon1" because it is simply the first dungeon.

When you have decided on a name, write it in the cell for the room you have chosen. Make sure you write the names carefully or it won't work.

From there, simply add more rooms until you feel satisfied with the layout. Don't worry about the size of the rooms or about where they will access each other--we will get to that later on.

For the sake of ease, keep your naming style consistent. For example, make sure all your hallways include the word "hall" or "corridor" in their name. What I've done is assigned a unique number to each hallway segment and made note of its direction, so for example, a hallway that is 3 segments long and heads to the right would have segments called "dungeonCorridorR1", "dungeonCorridorR2", and "dungeonCorridorR3".

If your hallways make turns, feel free to include the word "corner". If they split, use the word "junction." It is not necessary to use these words, but it will make it easier to refer back to them later.

If you have added multiple "floors" to your array, use the sheet number selector in the array editor to move between them and work on other levels.

You do not have to add all your rooms to the array at the same time; you can design the rooms individually and add them to the array whenever they are done if you want to.

Also, allow me to clarify something I feel is important: nothing in the game actually takes place within the array. The array simply exists to give the game something to reference when moving between rooms. The array does not contain any walls, objects, or players--it is only a reference. Otherwise, you would have to manually tell each layout where the player needs to go to for every exit from that layout, and you would have to do that for every layout. This would require a very bulky event sheet or even multiple event sheets.

Once you are satisfied with how your rooms are laid out, it's time for the best part.

  • 0 Comments

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