@@ -5,12 +5,6 @@ Stonesense art creation guide
5
5
6
6
Understanding sprites
7
7
---------------------
8
- Understanding how Stonesense deals with sprites is central to anyone who wishes to modify the content.
9
- The scheme is not very complicated, and this guide will give a short introduction to how they work.
10
- The way sprites are loaded is fairly generalized. With the exception of floors, which we will discuss later,
11
- all sprites are 32x32 pixels big and come in groups known as Sprite Sheets. All sprites are loaded and
12
- rendered in 32-bit full-color PNGs.
13
-
14
8
15
9
.. image :: ../images/stonesense-sprite-sample.png
16
10
:align: left
@@ -19,28 +13,35 @@ Here's an example of a typical Stonesense sprite.
19
13
20
14
Note that, in order not to conflict with neighboring sprites, a sprite must actually be within a smaller
21
15
area than its 32x32 block.
22
- A template for the area used by most sprites is:
16
+ A template for the area used by sprites is:
23
17
24
18
.. image :: ../images/stonesense-sprite-template.png
25
19
:align: left
26
20
27
21
The solid area is the floor space taken up by a sprite, while the dotted box indicates the volume above this
28
22
area corresponding to one z-level.
29
23
24
+ Understanding how Stonesense deals with sprites is central to anyone who wishes to modify the content.
25
+ The scheme is not very complicated, and this guide will give a short introduction to how they work.
26
+ The way sprites are loaded is fairly generalized. With the exception of floors, which we will discuss later,
27
+ all sprites are 32x32 pixels big and come in groups known as Sprite Sheets. All sprites are loaded and
28
+ rendered in 32-bit full-color PNGs. The image files should have a transparent background but pure magenta
29
+ (RGB: 255,0,255) is also treated as transparent.
30
+
30
31
Sprite sheets
31
32
-------------
32
- There can be an arbitrary number of sprite sheets configured for Stonesense, yet some are always present as
33
- they contain default sprites (see further down). Most of the content XML files allow users to specify sprite
34
- sheets, and this is done by adding a file attribute to the content nodes. By convention sprite sheets should
35
- be placed in their appropriate folder, with creature sprite sheets in the creatures folder etc.
33
+ There can be an arbitrary number of sprite sheets configured for Stonesense, though there are 3 sheets that are
34
+ always present as they contain default sprites (see further down). Most of the content XML files allow users to
35
+ specify sprite sheets, and this is done by adding a file attribute to the content nodes. By convention sprite
36
+ sheets should be placed in their appropriate folder, with creature sprite sheets in the creatures folder etc.
36
37
37
38
Sprite index
38
39
------------
39
40
Sprite Index (sometimes referred to as Sheet Index) is a concept for referring to a specific sprite on a sheet.
40
41
The index starts with the upper left sprite which has index zero. It then increments to the right. Stonesense
41
- is hardcoded to 20 sprites wide sheets, this means that the last sprite to the right in the first row has Sprite
42
- Index 19 . The first sprite on the second row has index 20. This boundary is hardcoded and changing the size of
43
- the sheet will not affect it.
42
+ is hardcoded to 20 sprites wide sheets, this means that anything past 20 " sprite slots" is ignored, though less
43
+ than 20 slots is fine . The first sprite on the second row has index 20, the next row is 40, and so on. This
44
+ boundary is hardcoded and changing the size of the sheet will not affect it.
44
45
45
46
This image shows how sprites are indexed. Note: Grid added for readability.
46
47
0 commit comments