There are two main issues you need to work out:
1) how many people will be using it regularly and
2) What size of table can the room support.
Both of these factors will influence the shape and size of the table. Each person sitting at the table will require a certain amount of room in front of them in order to play comfortably for long periods of time. Each player will also need a certain amount of room behind them to allow them to sit easily or allow others to pass unhindered behind them. Remember, playing a game can be as short as 15 minutes or as long as 6+ hours. If you are sitting there for 6+ hours, the table and chair and your personal space at the table had better be comfortable!
Player Sitting Width
When sitting at a table, the minimum amount of shoulder room you need is around 24' (average shoulder width). While most person can squeeze into 24', it will not do for long gaming periods as there will be lots of elbow/knee/legs knocking. If you want a more comfortable and spacious game experience, aim for a shoulder width of 30' for each person. This will give each player a lot of elbow room. Also keep in mind how wide the chairs you plan on using are. If they are 30' or greater, they will determine the amount of space each person has when sitting at the table. Therefore, the length of the table will be determined by the amount of shoulder space each player needs multiplied by the number of players on a side. Keep in mind that the table type (rectangular, circular, oval, etc.) affects how the players are distributed around the sides. As well, a table corner also affects how people will sit as two people cannot share a corner as their knees/feet with intersect under the table. Table legs also get in the way of peoples feet unless the leg is straddled. The table leg will also affect how the chair slides in when not in use. It all has to fit together.
Player Playing Space
Another important thing to think about is how much room in front of a player is available for them to use on the table. If a table is 2'4' wide, this gives players 14' of space in front of them (split the table in half for a player on each side). This is probably the bare minimum required for a games table as it should fit most game boards except for the very large boards. While this will work, it will be a very tight fit for your personal gaming space. It leaves very little space in front of each player to hold their cards or game pieces. On the other hand, going with a 4' wide table has its own advantages and disadvantages. A table 4' wide will fit 'almost' any board game (there are exceptions I imagine but lets be realistic) but at the cost of player usability. At 4', a player can reach approximately half way across and would have to stand up to reach further which could be tiresome if people are constantly standing/leaning forward every turn to play the game. Depending on the games being played, this may be fine. It is really dependent on what type of game is being played. Identify the games you plan on playing and how much movement your 'players' will be expected to do and design the table around that. Also keep in mind if you plan on having a leaning ledge as it will increase the width even more at the cost of removing some of the 'nice' playing surface area.
Table Shape
Is a circular/oval table better than a rectangular/square table? Depends...
Rectangular Tables
1. People sitting at Rectangular tables will not be able to reach the table center. People at the far ends will have to depend on others to help them in this regard.
2. Rectangular tables can be made longer to accommodate more people. The table width can be kept thinner so that people at each side can easily reach the center line or even 3/4 of the way across the table.
3. Rectangular tables fit within rooms better as the majority of rooms are rectangular.
4. You can't place two people at a corner of a rectangular table as their feet will collide with one another.
5. Most board games are rectangular so they typically fit better within a rectangular table but there is no reason why they wouldn't work with circular tables either.
6. With a rectangular table you can easily have two board games going on with 3 to 4 people each at either end of the table if it is long enough.
7. Rectangular tables deal with mostly 90 degrees so construction of a rectangular table is substantially easier (and more efficient usage of materials) compared to a circular table.
Circular Tables
1. Circular tables are great in that everyone is the same distance from the center of the table. For games this is perfect as you get a great view of everyone in front of you.
2. Small circular tables will have leg room issues where everyone will be kicking each other. The larger the table gets, the less of an issue this becomes.
3. As a circular table becomes larger, its square footage grows dramatically. It's great for fitting multiple people around at the cost of suddenly no one can reach the center of the table. If the circular table is a pedestal table, any one leaning on the table to reach the center will run into table tipping issues.
4. Large circular tables are also very difficult to fit in rooms due to their size.
5. Multiple games can be played on a single large circular table but due to how the people sit beside each other, these games would be limited to 2 or less (you could squeeze 3 in but it would be very cozy) per game in order for everyone to see and be within reach of the board game.
6. Circular tables are also more difficult to build since you are dealing with many curves and only a few 90 degree angles compared to a rectangular table. Making a curved vault would be a challenge!
Table Access
While space in front of the player at the table is important, so is the space behind the player. You need room at the table edge for the player and the chair to sit, as well as room behind them to allow a player to get up from the table unhindered while still allowing people to pass behind sitting players without touching them. Typically you will need a minimum of 30' of clearance for the player to sit in. This allows enough room for a chair and a person to take a seat or get up but does not give very much additional room for a person to pass behind someone sitting. So while 30' could be considered a minimum, you are better off having 48' (4 feet) of space from the table edge to the wall (or next piece of furniture). 48' is nice since it gives each player plenty of room to walk to their space and sit down without disturbing their neighbours. A problem with 48' is that making a 48' border around the table may not fit within the room you plan on putting the table in. Hence the need to determine what size of table you can fit in the room will be influenced by how much walk room you pick for around the table. A good idea is to take your room and make a 4' boundary from the walls into the room. The space left in the very middle is the space for your table. If it is too small, you will need to cut back on the 48' but don't go within 30' as that is the bare minimum space needed around the table for room to move around a sitting person. Going to the 30' minimum will result in a very crowded room so keep that in mind as well. If the table has fold out/sliding shelves, the 30' is reduced to ~24' which is not enough room. This occurs since when the shelves fold out/slide, the person sitting is forced to move back a few inches due to the extended shelf in front of them. As a result, the 30' minimum turns into 30'+ depending on how far the shelf extends out.
Room Mechanics
Quite often objects in the room can also influence where you place the table. An opening door into the room can possibly touch the table which is not advisable. Identify how much swing the door has and if there is enough clearance for the door to clear anyone sitting at the table. This also applies to any cabinet doors or other items that 'open' into the room. Also be aware of window placement and light fixtures as they can also affect where the table can be placed. Unless you are building a new room or renovating a room, this is usually out of your control. If you plan on having a rug in the room under the table, make sure the rug is large enough that it does not interfere with the chair legs of people getting in and out. If the rugs hinders someone trying to scoot their chair in, it will become a hindrance.
Example Table
Lets look at a rough table top designed to hold 8 people, 2 at each end and 3 along each long edge each with their own fold out shelf. Its current width is 4.5' and length is 7'. Are these table dimensions suitable for an 8 player table?
Lets dig into the table details... The available player space in front of each player (with no overlap with a neighbour player) is 15.75' with a large amount of space in the very middle for the game board. 6' of this 15.75' is taken up by a 6' leaning ledge (which can also fold out into a shelf). The 6' ledge could be used to hold cards since it would be easy to pick the cards up due to the ledge not having any edges to prevent cards from being slid off the ledge. This should be fine seeing as there is additional room in the middle of the table for a shared play space that everyone can use. The space in front of each player appears to be fine as it is more then the minimum 14' space recommended. The player can also store cards, etc. in the small private cubby hole under their 6' ledge if they wanted.
Lets look at the amount of room around this table for people sitting at it (shoulder room). It currently has about 22.5' of space for each person which is under the recommended 24'. This would be a very tight fit for the 3 people on each long edge of the table. If this was a 4 legged table this would be even worse as the players would be squished together even more by the corner table legs. The only way to fix 3 people in on each side would be to add a few more inches to each person's space on these long edges. This would not be as bad of a squish if this table used pedestal legs as each person on the long edges could move closer to their corner giving them the extra room they need. This would result in a slight misalignment of the corner people lining up with the center of their fold out shelves. Depending on the game, this might be OK, or not. If the table was designed to consistently sit 8 (3 people using shelves on each long edge, plus 1 at either short edge end), I would say this table would not be an ideal solution. If it was built for 6 people using the fold out shelves (2 people using shelves on each long edge, plus 1 at either short edge end) most of the time and 8 people occasionally, then it would be a much better fit. Again, the size of the table really depends on what usage the table will see and if it will fit within the room.
Now what room would this table would fit in? Lets start by placing the chair boundary (30') and the walk boundary (48') around the table. The 30' boundary is shown in green while the 48' boundary is shown in cyan. The correctly sized room for a 7' x 4.5' table would be 15' x 12.5'. This would give plenty of room around the table so people could move freely around the table without bothering people who are sitting at it.
Unfortunately the chances of having the perfectly sized room for the table will rarely happen. In fact more often the opposite will happen where you have a room and a table idea that just won't fit. In most cases, you should start with the room size and determine what size of table it will support and work backward into the table details. Most people don't do this and jump into designing the table first (I did!) so lets see what we can do when we have a table of a specific size and a room that is not perfect. This will eventually involve changing the table to fit the room.
Example Game Room
The game room dimensions (wall to wall) is approximately 13' x 13.7'. The table dimensions for this room is 7' x 4.5'. If we place the table in the middle of the room it would look like the following. I kept the 30' boundary (Green) and the 48' boundary (Cyan) visible for your reference.
After putting in a shelf along one side of the room (for holding the board games), the room size decreases to 13.7' x 11.58'. Will the table fit in this room? Looking at the room layout, it is most important that there is a walkway along the bottom and left hand side of the room to allow people to go from the stairs over to the side rooms and the hallway at the top left. In order to have 48' or more for space, the table will have to be squeezed into the top right hand corner as shown:
Is this bad? Lets add some people to get a feel for how much room you will actually have to move around the table. This would result in having the other sides with ~30' (This is very tight) and ~50' (great!) of room for people to walk by the table.
It is obvious that this is a pretty tight fit for the table. People along the top and right edges of the table will not have an easy time moving around due to the limited 30' of space. The closet would also not be accessible when people are sitting along that edge. On the positive side, the other two sides of the table have plenty of room. While not being perfect, the table could still be used in this scenario but you will hear a lot of complaining every time you get a big group together and that one person in the far corner has to go to the washroom and squeeze by people to get out. On top of this, the tight area around the walls will hinder any usage of the foldout shelves as they will decrease the 30' down to 24' since they fold out 5.5'. This is not enough room so some changes must be made in the table design.
Lets move the shelves to the right hand side of the room and turn the table 90 degrees. We already know the length of the table is an issue so lets shrink this by 1' and make the table 4' thinner. This leaves us with a 6' x 4'2 table. This will turn it from a 8 person table down to a 6 person table.
This looks a lot better as we now have 48' or more on 3 sides of the table (Left/Right/Bottom). The two most important areas (left and bottom) have the bare minimum 48' of room which is very important as this would be the main passage way between the stairs and the rest of the basement. This also removes the 'tunnel' that the shelving on the bottom wall would have created with the room located there. The tightest area of the table is now the top edge which has 36' of space. This is more than enough to prevent the closet doors from contacting the table and still gives the player sitting there enough room to be comfortable. The others can move freely around the other side of the table so this location does not bottle neck any player into a tight space which is good.
Having done this leg work, I would proceed with this size of table for this room over the original 7' x 4.5'.
Table Height
As for the correct height of the table, lets look at what is already well established regarding Dining Room Tables. Dining Room Tables typically are 30' tall and have enough room underneath for the legs & knees to fit comfortably (height from the floor to the bottom of the table). If your table is flat with no vault, this is easily accomplished as your table will typically be less than 4' thick which will give you at least 26' or more of leg/knee space. If a vault is included in the table, depending on its depth, the leg room underneath can quickly disappear. While there is no standard as to how much leg room you need, the tables I researched all had at least 25' or more of space. This means if you stick with a 30' tall table, you can make the table 5' thick and be fairly safe with the leg room underneath. These table height numbers are all relative to a chair height of 18'. The table and chair can deviate from these dimensions but straying too far from these numbers can result in an uncomfortable table. If you decide to go outside of these boundaries, make sure to do a mock up to see how it feels.
If you wanted to design a table at bar height, you would aim for ~42' tall. This height is the average height needed for comfort when standing, and when used for sitting with a bar stool that is 30' tall. The rest of the information regarding widths and sizes still applies regardless of what height you decide to make your table at.
Disclaimer: I take no responsibility for how your project turns out using any of this information.
Back to the Game Table Design Series: Index
Cylinders, cones, pyramids, spheres and cubes are simple three-dimensional shapes often taught to elementary school students beginning their study of the subject. The concept of a third dimension can.
- 14
- 5.25
- Last edited Fri Jan 8, 2016 2:46 pm (Total Number of Edits: 6)
- [+] Dice rolls
I'm new at C# and I want to create a multidimensional array like this:
But in 8x8x4 cells.
I want to store maze cells.
3 Answers
I'm aware it does not explicitly answer the question, but in my opinion you're shooting yourself in the foot by working with 3D arrays. C# is an OO language, so it really helps if you think OO.
Instead of working with a multidimensional array representing cells for you 3d Maze (if it is really a 3d maze you want), why not create a List
of classes named Cell, each one containing their position and other stuff you need, like :
Then you can have a simple List<Cell>
that you can iterate over.You can also remove the x,y,z and create a Position
class.
For walls, you can create an Enum
and use bitwise operations, or store a list of Enum
. Since you're a beginner, I'd suggest you the list of enums. You would have to add this Enum in the code, and this property to the Cell
class :
That way, every operation will be much much easier to do. For example, if you need to explore every cell at the column #3, you can do
Need to render every explored cell differently?
And so on.
No need for complicated for
loops with your 3 dimensions, and a simple foreach
is in my opinion far more readable than a
every time you need to access your table.
The only ugly part would be to fill you list (By creating new Cell
instances), but it would still be far more readable than a huge wall of { { { 0, 1, 0, 1 }, {1, 1, 1, 0} [...]
I'd also suggest that you read an introduction to OO principles.
With multidimensional arrays, you can either set them all at once (using basically the syntax you showed):
or you can set the items one by one:
there is nothing in between. The best you could do is to write an extension method that would work something like this:
As an alternative, you could use 2D array of arrays:
or you could use almost the syntax you proposed:
A disadvantage of this approach is that it doesn't force the inner arrays to be all the same length.
As proposed in comments, another option would be use a custom type like
Cell
and have a 2D array of those. Doing that makes it clearer what the array actually means,table[0,0].Left
is certainly more readable thantable[0,0,1]
.If the wall can be there or not, you shouldn't use
int
values0
and1
, you should usebool
valuesfalse
andtrue
. If you want to have more states, anenum
might be appropriate.Your structure contains a lot of duplication, since bottom of a cell is the same as top of the cell below it (unless you want to have one way walls). This means the structure can get into an inconsistent state, which is often hard to debug (“The wall isn't there? But I just looked and it is there.”).
One way to avoid that would be store walls instead of cells. Instead of 8×8 cells, you would have 8×9 horizontal walls and 9×8 vertical walls. You could then have methods that would abstract this away, so you could easily look up walls of a particular cell.
An array initializer for a 3D array would look like this:
The first line is right. The second line won't work. The closest thing is to use a 2D array of arrays:
Like @tigrou and @Pierre-Luc Pineault suggested, it would be a lot cleaner to encapsulate each cell in an object instead of a plain array.
Consider storing the data in an external file and reading it in instead of hardcoding the 256 numbers.