1
-
2
1
# Rendering Overview
3
2
4
3
The Game Boy outputs graphics to a 160x144 pixel LCD, using a quite complex
5
4
mechanism to facilitate rendering.
6
5
7
6
::: warning Terminology
8
7
9
- Sprites/graphics terminology can vary a lot among different platforms, consoles,
8
+ Sprites/graphics terminology can vary a lot among different platforms, consoles,
10
9
users and communities. You may be familiar with slightly different definitions.
11
- Keep also in mind that some of the definitions refers to lower (hardware) tools
10
+ Keep also in mind that some definitions refer to lower (hardware) tools
12
11
and some others to higher abstractions concepts.
13
12
14
13
:::
@@ -17,13 +16,13 @@ and some others to higher abstractions concepts.
17
16
18
17
Similarly to other retro systems, pixels are not manipulated
19
18
individually, as this would be expensive CPU-wise. Instead, pixels are grouped
20
- in 8x8 squares, called * tiles * (or sometimes "patterns"), often considered as
19
+ in 8x8 squares, called _ tiles _ (or sometimes "patterns"), often considered as
21
20
the base unit in Game Boy graphics.
22
21
23
22
A tile does not encode color information. Instead, a tile assigns a
24
- * color ID * to each of its pixels, ranging from 0 to 3. For this reason,
25
- Game Boy graphics are also called * 2bpp * (2 bits per pixel). When a tile is used
26
- in the Background or Window, these color IDs are associated with a * palette * . When
23
+ _ color ID _ to each of its pixels, ranging from 0 to 3. For this reason,
24
+ Game Boy graphics are also called _ 2bpp _ (2 bits per pixel). When a tile is used
25
+ in the Background or Window, these color IDs are associated with a _ palette _ . When
27
26
a tile is used in an OBJ, the IDs 1 to 3 are associated with a palette, but
28
27
ID 0 means transparent.
29
28
@@ -43,11 +42,11 @@ but it works for the most part.
43
42
44
43
### Background
45
44
46
- The background is composed of a * tilemap * . A tilemap is a
45
+ The background is composed of a _ tilemap _ . A tilemap is a
47
46
large grid of tiles. However, tiles aren't directly written to tilemaps,
48
47
they merely contain references to the tiles.
49
48
This makes reusing tiles very cheap, both in CPU time and in
50
- required memory space, and it is the main mechanism that helps working around the
49
+ required memory space, and it is the main mechanism that helps work around the
51
50
paltry 8 KiB of video RAM.
52
51
53
52
The background can be made to scroll as a whole, writing to two
@@ -60,19 +59,19 @@ It is fairly limited: it has no transparency, it's always a
60
59
rectangle and only the position of the top-left pixel can be controlled.
61
60
62
61
Possible usage include a fixed status bar in an otherwise scrolling game (e.g.
63
- * Super Mario Bros. 3 * ).
62
+ _ Super Mario Bros. 3 _ ).
64
63
65
64
### Objects
66
65
67
66
The background layer is useful for elements scrolling as a whole, but
68
67
it's impractical for objects that need to move separately, such as the player.
69
68
70
- The * objects * layer is designed to fill this gap: * objects * are made of 1 or 2 stacked tiles (8x8 or 8x16 pixels)
69
+ The _ objects _ layer is designed to fill this gap: _ objects _ are made of 1 or 2 stacked tiles (8x8 or 8x16 pixels)
71
70
and can be displayed anywhere on the screen.
72
71
73
72
::: tip NOTE
74
73
75
- Several objects can be combined (they can be called * metasprites * ) to draw
74
+ Several objects can be combined (they can be called _ metasprites _ ) to draw
76
75
a larger graphical element, usually called "sprite". Originally, the term "sprites"
77
76
referred to fixed-sized objects composited together, by hardware, with a background.
78
77
Use of the term has since become more general.
@@ -83,4 +82,4 @@ To summarise:
83
82
84
83
- ** Tile** , an 8x8-pixel chunk of graphics.
85
84
- ** Object** , an entry in object attribute memory, composed of 1 or 2
86
- tiles. Independent from the background.
85
+ tiles. Independent of the background.
0 commit comments