Graphics, Camera, Action
Learn how to implement graphical layers, reduce the visible portion of the map, and create a camera for a dungeon crawler.
ASCII is a great prototyping tool, used even for some big-budget games, such as Rogue or Nethack. Most games employ artists to feature graphics, but that’s beyond this early stage of development; we might decide to change the game which would waste hours of the artists’ work.
In early development, it’s a much better idea to use programmer art—rough graphics designed to give an idea for the feel of a game, but without requiring a large time investment if (when) we decide to change things.
Programmer art for the dungeon
The bracket-lib library renders terminals by copying glyphs from a font file onto the terminal window. We can take advantage of this during prototyping by assigning a symbol to a tile type and replacing that character in the font file with our chosen programmer’s art. Any bitmap editor can do the job.
Another folder, resources, will hold all graphical resources needed for the game. In this case, it holds dungeon.png
in the resources directory. Rather than re-create this file throughout the course, the file includes all graphics needed for the game. The following glyphs are defined:
Get hands-on with 1400+ tech skills courses.