Dungeon crawler text game

A

Adam Bilbrough

Hey!

So I'm new to Ruby (comming from a Python/C# background) and I love the
language! So much so, that I want to re-create a text based dungeon
game.
I got the basics down with help from a Ruby book I'm reading and I've
upgraded it with many new areas, enemies and some objectives but am a
bit stumped on how to make it manually navigable. I thought having
@player.location.connections { player_move "go south" } might work, but
it didn't.

Also, I'm in the process of adding an inventory and items (for quests)
and am just wondering if using a 4 by 4 array system that the game
checks for items stored in the array that the player can use, is the
best way to go about things.

Thanks in advance!
 
M

Matthew K. Williams

Here's a link to a blogpost I wrote for a zork-like text based adventure
using statemachine and treetop. It handles the "map" and moving various
directions, as well as inventory.. The layout of the adventure/dungeon is
within a yaml file

http://matthewkwilliams.com/index.php/2008/09/05/a-gruesome-look-at-statemachine-and-treetop/

Hope that helps,
Matt

--
"... if you do follow your bliss you put yourself on a kind of
track that has been there all the while, waiting for you, and the life
that you ought to be living is the one you are living. When you can
see that, you begin to meet people who are in your field of bliss, and
they open doors to you. I say, follow your bliss and don't be afraid,
and doors will open where you didn't know they were going to be." --
Joseph Campbell
 
S

Seebs

Also, I'm in the process of adding an inventory and items (for quests)
and am just wondering if using a 4 by 4 array system that the game
checks for items stored in the array that the player can use, is the
best way to go about things.

Much though I like Ruby, I mostly write these in Inform 6, because it's
a language purpose-built for the task. Well, actually. It's a language
with a library purpose-built for the task. And it renders to standard
formats which all the game engines run.

-s
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top