-
Notifications
You must be signed in to change notification settings - Fork 16
At the end of this chapter, your dungeon will be filled with floors, walls and actors.
First of all, add a font and a tilemap to resource
folder. The GUI font, Fira Code, is created by Nikita Prokopov. The tileset, curses_vector, is created by DragonDePlatino for Dwarf Fortress. Create a new folder sprite
which will be used to store sprite scenes.
Remove icon
node from previous chapter. Add a Sprite
node and name it as PC
. Follow these steps to cut a sprite off the tilemap. (1) Select PC
node. (2) In the Inspector
tab, click Sprite -> Texture -> [empty]
. In the dropdown menu, select New AtlasTexture
. (3) Click Sprite -> Texture -> AtlasTexture
. Click Atlas -> [empty]
. In the dropdown menu, select Load
. (4) Load res://resource/curses_vector_24x36.png
.
(5) Click TextureRegion
on the Bottom Panel. (6) Click the up arrows on the lower right corner or press Shift+F12 to expand the panel. (7) Set Snap Mode
to Grid Snap
. The offsets and steps are 24x36
, which corrsepond to the size of each tile (24px wide and 36px high). (8) Drag and drop a rectangular to select @
symbol.
There are two more post-processing steps. Change PC
's color to ABB2BF
. Save the node as a scene (PC.tscn
) in sprite
folder. Repeat these steps until your demo looks like the image below. Note that Floor
sprite has a greyish color: 495162
.