I started a text adventure game using prolog for my intro to different languages programming class last semester. I just found the thing on my hard drive so I thought I'd share it. I think it's a good demonstration as to how different it is to make games in different languages.

Heres the source code:
Code:
% Author: Jeremy Gibers
% Date: 4/29/2004
return(exit).
player_stat(name, 'stranger').
player_stat(race, human).
player_stat(class, fighter).
player_stat(health, 100).
player_stat(mana, 66).
player_stat(direction, north).

mob_stat(name, pion).
mob_stat(race, orc).
mob_stat(class, fighter).
mob_stat(health, 100).
mob_stat(mana, 50).

dropitem_stat(type, food). %food, water, elixer, weapon, or armor
dropitem_stat(name, meat). %will be randomly generated
dropitem_stat(bleh).

bonus(health, human, fighter, 1.3).
bonus(health, human, mage, 0.89).
bonus(mana, human, fighter, 0.6).
bonus(mana, human, mage, 1.4).
bonus(health, orc, fighter, 2.2).
bonus(health, orc, mage, 1.9).
bonus(mana, orc, fighter, 0.4).
bonus(mana, orc, mage, 1.0).
bonus(health, elf, fighter, 1.0).
bonus(health, elf, mage, 1.0).
bonus(mana, elf, fighter, 1.2).
bonus(mana, elf, mage, 2.0).

race(human).
race(orc).
race(elf).

class(fighter).
class(mage).

direction(north).
direction(east).
direction(south).
direction(west).
description(north) :-
                 write('A great distance ahead of you lie enormous mountains casting'),nl,
                 write('luminous shadows upon the landscape that lay before it.'), nl.
description(east) :-
                 write('Medows of long grass lay waving in ominous rythems. They'), nl,
                 write('seem an endless ocean that melts into the horizon.'), nl.
description(south) :-
                 write('A putrid smell is radiating from a gruesome swamp that'), nl,
                 write('while is miles away seems ever present in your proximity.'), nl.
description(west) :-
                  write('In the great distance they stands erect a ledge of wood'),nl,
                  write('drenched in clounds of foilage. The forrest seems alive with life.'), nl.

nameparts(weapon, 0, sword).
nameparts(weapon, 0, knife).
nameparts(weapon, 0, polearm).
nameparts(weapon, 0, blade).
nameparts(weapon, 0, knuckles).
nameparts(weapon, 0, staff).
nameparts(weapon, 0, bow).
nameparts(name, 1, ana).
nameparts(name, 2, ord).
nameparts(name, 3, wyn).
nameparts(name, 4, tor).
nameparts(name, 5, dur).
nameparts(name, 6, oth).
nameparts(name, 7, ulth).
nameparts(name, 8, iel).
nameparts(name, 9, va).

%1 to 2 offer best results.
genname(Number, Name) :- Number >= 0, Rand is random(8) + 1, nameparts(name, Rand, Part),
                         string_concat(Name, Part, Whole), N is Number - 1,
                         genname(N, Whole);
                         write(Name), nl.
genname(0, Name) :- nl, write(Name), nl.

rollcharacter :- write('In the world of Aden, identy is everything. Your name may echo'), nl,
                 write('honorably in the halls of mighty castles. Or perhaps be whispered'), nl,
                 write('in discust through the streets of the commoners. Your destiny'), nl,
                 write('is yours to make.'), nl,
                 write('What name will your reputation be established with?'), nl,
                 write('(enter your name, no spaces, lowercase): '), nl, getname, nl,
                 write('Now you must select what race you take form of in this new'), nl,
                 write('mysterious world of Aden. Each race has pros and cons that'), nl,
                 write('you must consider with great earnest. They will ultimately'), nl,
                 write('dertermine your success in this life. Make your choice now.'),nl,
                 write('What race will you be? (human, orc, elf)'), nl,
                 getrace, nl,
                 write('Ah, a good choice. Now you will choose your craft. How will'), nl,
                 write('you wrack the land in havoc and chaos, or justly protect the'),nl,
                 write('the inocent. Perhaps you baffle the commons with mysticism, and'),nl,
                 write('supernatural phenomena. Or they will envy you for your great'), nl,
                 write('strength and skill, cleaving away at enemys with your great broadsword.'),nl,
                 write('What will it be young one? The life of a Mage, or the life of a Fighter?'),nl,
                 write('What class will you be? (mage, fighter)'), nl,
                 getclass, nl,
                 write('Congratulations! You have begun your journey. With good judgement, and'),nl,
                 write('perhaps a bit of luck, you can make it a long and prosperous one.'),nl,nl,
                 write('Suddenly everything is black, and void. You feel as if you are floating'),nl,
                 write('in the true definition of nothingness. Just before the moment of despair'),nl,
                 write('a single point of light appears in the distance just out of reach.'),nl,
                 write('Quickly the light begins to envelope you, and the blinding whiteness'),nl,
                 write('of it fades into shades of green, and blue, and soft browns. The image'),nl,
                 write('becomes more clear, and you realize you are lying in a soft patch of grass'),nl,
                 write('in a vast meadow. As you gain your senses you slowly realize you are in'),nl,
                 write('Aden. After several moments gazing at your suroundings in amazement you'),nl,
                 write('begin to take a personal inventory. You are unarmed, have minimal food'),nl,
                 write('supplies, and are covered in feable leather clothing. Already you begin'),nl,
                 write('to question the decisions youve made. But no matter, you must continue.'),nl,nl.


getname :- read(Name),
           retract(player_stat(name, _)),
           assert(player_stat(name, Name)).
           
getrace :- read(Race), race(Race), retract(player_stat(race, _)), assert(player_stat(race, Race));
           write('Sorry, that isnt available. Try again:'), nl, getrace.
           
getclass :- read(Class), class(Class), retract(player_stat(class, _)), assert(player_stat(class, Class));
           write('Sorry, that isnt available. try again:'), nl, getclass.

mainloop :- player_stat(direction, Dir), description(Dir), getcommand, mainloop;
            write('Thanks for playing').

go :- rollcharacter, mainloop.

getcommand :- write('You can go: north, south, east, west'), nl,nl, write('Action?'),nl, read(Command), docommand(Command).
docommand(Dir) :- direction(Dir), retract(player_stat(direction, _)), assert(player_stat(direction, Dir));
                  not(return(Dir)), write('Invalid command, if you need help type h'), nl, getcommand;
                  1 < 0. %return false
And heres a once through using all the features that are implimented.
Welcome to SWI-Prolog (Version 3.2.8)
Copyright (c) 1993-1998 University of Amsterdam. All rights reserved.

For help, use ?- help(Topic). or ?- apropos(Word).

?- consult('C:/Documents and Settings/Jeremy/My Documents/prolog/game.pl').
C:/Documents and Settings/Jeremy/My Documents/prolog/game.pl compiled, 0.00 sec, 13,380 bytes.

Yes
?- go.
In the world of Aden, identy is everything. Your name may echo
honorably in the halls of mighty castles. Or perhaps be whispered
in discust through the streets of the commoners. Your destiny
is yours to make.
What name will your reputation be established with?
(enter your name, no spaces, lowercase):
|: bontaur.

Now you must select what race you take form of in this new
mysterious world of Aden. Each race has pros and cons that
you must consider with great earnest. They will ultimately
dertermine your success in this life. Make your choice now.
What race will you be? (human, orc, elf)
|: human.

Ah, a good choice. Now you will choose your craft. How will
you wrack the land in havoc and chaos, or justly protect the
the inocent. Perhaps you baffle the commons with mysticism, and
supernatural phenomena. Or they will envy you for your great
strength and skill, cleaving away at enemys with your great broadsword.
What will it be young one? The life of a Mage, or the life of a Fighter?
What class will you be? (mage, fighter)
|: mage.

Congratulations! You have begun your journey. With good judgement, and
perhaps a bit of luck, you can make it a long and prosperous one.

Suddenly everything is black, and void. You feel as if you are floating
in the true definition of nothingness. Just before the moment of despair
a single point of light appears in the distance just out of reach.
Quickly the light begins to envelope you, and the blinding whiteness
of it fades into shades of green, and blue, and soft browns. The image
becomes more clear, and you realize you are lying in a soft patch of grass
in a vast meadow. As you gain your senses you slowly realize you are in
Aden. After several moments gazing at your suroundings in amazement you
begin to take a personal inventory. You are unarmed, have minimal food
supplies, and are covered in feable leather clothing. Already you begin
to question the decisions youve made. But no matter, you must continue.

A great distance ahead of you lie enormous mountains casting
luminous shadows upon the landscape that lay before it.
You can go: north, south, east, west

Action?
|: north.
A great distance ahead of you lie enormous mountains casting
luminous shadows upon the landscape that lay before it.
You can go: north, south, east, west

Action?
|: east.
Medows of long grass lay waving in ominous rythems. They
seem an endless ocean that melts into the horizon.
You can go: north, south, east, west

Action?
|: south.
A putrid smell is radiating from a gruesome swamp that
while is miles away seems ever present in your proximity.
You can go: north, south, east, west

Action?
|: west.
In the great distance they stands erect a ledge of wood
drenched in clounds of foilage. The forrest seems alive with life.
You can go: north, south, east, west

Action?
|: h.
Invalid command, if you need help type h
You can go: north, south, east, west

Action?
|:exit.
Invalid command, if you need help type h
You can go: north, south, east, west

Action?
|: exit.
Thanks for playing
Yes
?- genname(1, sword_of_).
sword_of_othdur

Yes
?- genname(2, sir_).
sir_ulthduroth

Yes
?- genname(3, robin_of_).
robin_of_anadurulthulth

Yes