Game Development Reference
In-Depth Information
Role-Playing Games
Role-playing games are very popular with game developers, but they are also very
challenging. Role-playing games have many items, locations, enemies, and
characters; these all require text and art. There are also several systems that need
to be developed to create a full game: the conversation system, world explora-
tion, inventory management, a leveling system, and combat.
Roguelike Games
Roguelike games get their name from their similarity to an early dungeon
crawling game called Rogue. Roguelikes nearly always use the ASCII characters
instead of graphics. Like text games, this means more of the programmer's time
can be focused on the game instead of developing graphics. Some of the more
popular Roguelikes are ADoM ( http://www.adom.de/), Nethack ( http://www
.nethack.org/), and Crawl ( http://crawl.develz.org/wordpress/). ASCII is also
used for Dwarf Fortress ( http://www.bay12games.com/dwarves/), a large-scale
generic fantasy world creator and simulator that allows the user to control a
number of dwarves as they build an underground lair. ASCII games do not have
to be simple; Dwarf Fortress includes a detailed weather simulator, fluid physics,
psychological models, and much more.
Creating an ASCII game in C# is similar to creating a text-based game. A console
application should be created. Unlike the text game, ASCII games need a game
loop. Each update, the world is output as text to the console. After the world is
printed, the console cursor needs to be moved back to the start of the console
window. The console cursor is a position that dictates where text will be printed
when the program writes to the console. The next world update is printed over
the earlier one, updating it. Here is some code that renders a small ASCII map
with an @ character representing the player.
static void Main(string[] args)
{
int _mapWidth = 10;
int _mapHeight = 10;
int _playerX = 0;
int _playerY = 0;
bool _playerIsAlive = true;
while (_playerIsAlive)
{
for (int i = 0; i < _mapHeight; i++)
 
Search WWH ::




Custom Search