Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
0
1
00:00:00,030 --> 00:00:03,690
Grids are the most common way to create 2D environments.
1
2
00:00:03,780 --> 00:00:12,270
But don't be fooled by their 2D capabilities, as they can also be used in 3D games that are limited
2
3
00:00:12,270 --> 00:00:13,560
to a flat surface.
3
4
00:00:13,590 --> 00:00:15,330
A grid is a set of lines.
4
5
00:00:15,600 --> 00:00:22,080
As you can see here, and columns that are put together to form a 2D table. Where each point or cell
5
6
00:00:22,110 --> 00:00:27,280
can be referenced by a pair of a row index and a column index.
6
7
00:00:27,450 --> 00:00:34,290
If you want to learn how to implement grids, head over to the bonus module and look at data structures.
7
8
00:00:34,380 --> 00:00:38,460
Let's find out what are the pros and cons when using grids.
8
9
00:00:38,520 --> 00:00:44,820
The first one is that it's very easy to use: create a 2D array of elements and it will already work with
9
10
00:00:44,820 --> 00:00:45,930
the map structure.
10
11
00:00:45,990 --> 00:00:51,270
If the map was designed to support the grid in the first place. It supports real time changes.
11
12
00:00:51,270 --> 00:00:54,000
Does your game have actions that change the map?
12
13
00:00:54,000 --> 00:01:01,560
By having a grid, you can easily set what's walkable and what's not, and the best part is that it's
13
14
00:01:01,560 --> 00:01:04,650
already implemented in most common game engines
14
15
00:01:04,650 --> 00:01:06,840
Godot included. All of these pros...
15
16
00:01:06,840 --> 00:01:12,030
That means that grids must have some cons and they do have: They have a fixed shape.
16
17
00:01:12,180 --> 00:01:14,820
It will always be a square shaped. Of course,
17
18
00:01:14,820 --> 00:01:20,730
you can disable the sides to make interesting shapes, but is very much limited to that.
18
19
00:01:20,790 --> 00:01:28,410
It cannot support height variation and if your game has hills, valleys, then a grid might not work
19
20
00:01:28,410 --> 00:01:29,250
for your game.
20
21
00:01:29,400 --> 00:01:33,090
In general, it cannot provide too much environment variation.
21
22
00:01:33,090 --> 00:01:36,930
Having a grid city might not be exactly fun in some cases.
22
23
00:01:37,080 --> 00:01:42,450
If a grid-like structure sounds too restrictive to you, then you might want to try graphs.
23
24
00:01:42,810 --> 00:01:44,340
Let's look at them right now.
2544
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.