Dungeon crawler text game

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!

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

On 2009-10-06, Adam B. [email protected] wrote:

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs