[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Using Ruby as a scripting language within a C app

forgottenwizard

9/22/2008 3:55:00 AM

I'm working on building a MUD, and I would like to be able to use Ruby
as the scripting language within the MUD (such as with mobiles, rooms,
objects, ect).

I would like someone to give me an idea on how to do this, as well as an
idea on how much effort and time this will require.
--
I'm not anti-social, I'm just not user friendly


4 Answers

Brian Candler

9/22/2008 7:41:00 AM

0

forgottenwizard wrote:
> I'm working on building a MUD, and I would like to be able to use Ruby
> as the scripting language within the MUD (such as with mobiles, rooms,
> objects, ect).
>
> I would like someone to give me an idea on how to do this, as well as an
> idea on how much effort and time this will require.

http://poignantguide.net/ruby/chap...

Scroll down to "A Sponsored Dragon-Slaying" and enjoy.
--
Posted via http://www.ruby-....

Huw Collingbourne

9/22/2008 8:47:00 AM

0

forgottenwizard wrote:
> I'm working on building a MUD, and I would like to be able to use Ruby
> as the scripting language within the MUD (such as with mobiles, rooms,
> objects, ect).

If you are using C/C++ (or indeed C#) in .NET you can embed Ruby
programs using our free Ruby Connector:

http://www.sapphir.../SapphireSteel...

For some ideas on writing adventure type games in Ruby, you may find my
Ruby adventure game tutorial of use:

http://www.bitwisemag.com/2/Adventur...
http://www.bitwisemag.com/2/Adventur...-Part-2
http://www.bitwisemag.com/2/Adventur...-Part-3

best wishes
Huw Collingbourne

SapphireSteel Software
Ruby and Rails In Visual Studio
http://www.sapphir...
--
Posted via http://www.ruby-....

Ken Bloom

9/22/2008 8:27:00 PM

0

On Mon, 22 Sep 2008 02:41:12 -0500, Brian Candler wrote:

> forgottenwizard wrote:
>> I'm working on building a MUD, and I would like to be able to use Ruby
>> as the scripting language within the MUD (such as with mobiles, rooms,
>> objects, ect).
>>
>> I would like someone to give me an idea on how to do this, as well as
>> an idea on how much effort and time this will require.
>
> http://poignantguide.net/ruby/chap...
>
> Scroll down to "A Sponsored Dragon-Slaying" and enjoy.

Aside from being entertaining, what does this have to do with embedding
Ruby in a C-based MUD engine?

--Ken

--
Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu...

Brian Candler

9/22/2008 8:59:00 PM

0

Ken Bloom wrote:
> On Mon, 22 Sep 2008 02:41:12 -0500, Brian Candler wrote:
>
>> Scroll down to "A Sponsored Dragon-Slaying" and enjoy.
> Aside from being entertaining, what does this have to do with embedding
> Ruby in a C-based MUD engine?

OK, I missed the smiley, <aside> tag etc.

For a more useful link, see
http://www.ruby-doc.org/docs/ProgrammingRuby/html/ext...

The section "Embedding a Ruby Interpreter" is brief, but much of the
preceding stuff about VALUE and so on is relevant. There's enough to get
started with experimenting anyway.

In any case, a simple Google for "embedded ruby" turns up a bunch of
useful stuff. The first hit is http://metaeditor.sourceforge....

None of that is specific to the problem domain of MUDs (apart from
_why's page), but once you have an embedded ruby interpreter, what you
do with it is up to you.

I'd question why you'd want to write any of the rest of it in C, but
that's a different issue :-)
--
Posted via http://www.ruby-....