What is ASCII?

ASCII abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Most modern character-encoding schemes are based on ASCII, although they support many additional characters.

Using ASCII to describe a map is a great way to generate maps procedurally based on the ASCII characters. For example, creating a floor tile that players can walk on can be describe as the character 0, whereas a chest players can loot could be described as the character L. The choice of characters is up to you, and how you parse these characters will depend on your own algorithms.

Here is an example of what a ASCII map could look like. This map is 20 x 10. Hover over the rows in the table to highlight the characters in the ASCII map.

Character Tile Type
Map
0 Floor 22222222222222222222
200E0E00100E010E0002
22222002200022200222
22E02FF2E02220200E02
2200000220200F002002
222220EE002222002212
2FF022200220E2222002
2020E022022000002002
2S20E010E01020E02002
22222222222222222222
1 Hole
2 Wall
E Enemy
F Fire
S Player Spawn
Scroll to Top