Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.ruby



Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 02-07-2010, 11:29 AM
Schala Zeal
Guest
 
Posts: n/a
Default Honest opinion needed...

I've been trying to find a scripting language to integrate into a game
I'm developing in C and my choices are pretty much either Ruby or Lua.

See, game developers tell me Lua is the way to go for performance and
flexibility, but the C embedding API feels so low-level that it's
intimidating.

Ruby, on the other hand, has a much friendlier C embedding API and
doesn't look to need the developer jumping through hoops. However, some
of my friends develop their games on a program called RPGMaker and they
say the newer versions are awful mainly because of Ruby being the new
scripting language and on top of that, Ruby's been criticized for the
processing power.

I looked into Ruby 1.9 to find it adopted a more efficient third-party
interpreter and that code runs 15% faster... or something. Reading about
that restored my hope that I could use Ruby with no reprecussions. On a
hunch, I checked the latest RPGMaker's release date which was Dec 27,
2007.

A lot of concerns plague me about 1.9. I suppose the most important
would be does 1.9 redeem Ruby's processing efficiency? Version 1.9 is
fairly new, so I'm guessing RPGMaker had to be using 1.8 or lower, which
is the old engine.

The bottom line is would there be any negative impact if I were to embed
a Ruby 1.9.1 scripting engine in my game, in contrast to Lua?
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
Alt Today
Advertising
Google Adsense
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 02-07-2010, 11:52 AM
¼ÖèÉ
Guest
 
Posts: n/a
Default Re: Honest opinion needed...

Limiting the use of dynamic features of ruby will lead to better
performance since ruby 1.9 uses YARV. But something like
multi-threading or resource-consuming will possibly bother you.

Above all, you should think over that whether a fully-featured
scripting language is really needed. I think building small
domain-specific languages for different aspects in your game will
reduce the complexity of development and will lead to better
performance.

2010/2/7 Schala Zeal <schalaalexiazeal@gmail.com>:
> I've been trying to find a scripting language to integrate into a game
> I'm developing in C and my choices are pretty much either Ruby or Lua.
>
> See, game developers tell me Lua is the way to go for performance and
> flexibility, but the C embedding API feels so low-level that it's
> intimidating.
>
> Ruby, on the other hand, has a much friendlier C embedding API and
> doesn't look to need the developer jumping through hoops. However, some
> of my friends develop their games on a program called RPGMaker and they
> say the newer versions are awful mainly because of Ruby being the new
> scripting language and on top of that, Ruby's been criticized for the
> processing power.
>
> I looked into Ruby 1.9 to find it adopted a more efficient third-party
> interpreter and that code runs 15% faster... or something. Reading about
> that restored my hope that I could use Ruby with no reprecussions. On a
> hunch, I checked the latest RPGMaker's release date which was Dec 27,
> 2007.
>
> A lot of concerns plague me about 1.9. I suppose the most important
> would be does 1.9 redeem Ruby's processing efficiency? Version 1.9 is
> fairly new, so I'm guessing RPGMaker had to be using 1.8 or lower, which
> is the old engine.
>
> The bottom line is would there be any negative impact if I were to embed
> a Ruby 1.9.1 scripting engine in my game, in contrast to Lua?
> --
> Posted via http://www.ruby-forum.com/.
>
>


Reply With Quote
  #3 (permalink)  
Old 02-08-2010, 07:04 PM
Seebs
Guest
 
Posts: n/a
Default Re: Honest opinion needed...

On 2010-02-07, Schala Zeal <schalaalexiazeal@gmail.com> wrote:
> See, game developers tell me Lua is the way to go for performance and
> flexibility, but the C embedding API feels so low-level that it's
> intimidating.


It is intentionally low-level, but really, it's not bad.

> The bottom line is would there be any negative impact if I were to embed
> a Ruby 1.9.1 scripting engine in my game, in contrast to Lua?


The obvious thing, I think, would be the size and complexity. Lua's a
really beautiful simple language for the kind of thing it's trying to do.
Lua is very well suited to being the scripting engine for a game; it's a
simple language with a small set of features (the entire LANGUAGE is
probably smaller than some regex implementations!) that are easy to get
used to. Ruby's a lot larger and more powerful... But frankly, a game
scripting engine doesn't NEED to be exceptionally powerful, it just needs
well-chosen primitives.

Background: I have written a couple of WoW addons in Lua, I've also done
various scripting for a couple of other games which used Lua. It really
is a very good fit for the problem space. I love Ruby, but I wouldn't try
to embed it in stuff; I'd write things in it, though.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
Reply With Quote
  #4 (permalink)  
Old 02-08-2010, 10:23 PM
Schala Zeal
Guest
 
Posts: n/a
Default Re: Honest opinion needed...

Well I mean I read chapters 24 to 29 of Programming in Lua 1st Edition
and I was like "oh my god..."
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #5 (permalink)  
Old 02-08-2010, 10:33 PM
Tony Arcieri
Guest
 
Posts: n/a
Default Re: Honest opinion needed...

[Note: parts of this message were removed to make it a legal post.]

On Sun, Feb 7, 2010 at 4:29 AM, Schala Zeal <schalaalexiazeal@gmail.com>wrote:

> I've been trying to find a scripting language to integrate into a game
> I'm developing in C and my choices are pretty much either Ruby or Lua.
>
> See, game developers tell me Lua is the way to go for performance and
> flexibility, but the C embedding API feels so low-level that it's
> intimidating.
>
> Ruby, on the other hand, has a much friendlier C embedding API and
> doesn't look to need the developer jumping through hoops.



Ruby has a C embedding API? First I've ever heard of that.

Lua is designed for embedding. Ruby isn't. That doesn't mean you can't
embed Ruby, but YMMV...

--
Tony Arcieri
Medioh! A Kudelski Brand

Reply With Quote
  #6 (permalink)  
Old 02-09-2010, 01:07 AM
Tony Arcieri
Guest
 
Posts: n/a
Default Re: Honest opinion needed...

[Note: parts of this message were removed to make it a legal post.]

On Mon, Feb 8, 2010 at 3:33 PM, Tony Arcieri <tony@medioh.com> wrote:

> Lua is designed for embedding. Ruby isn't. That doesn't mean you can't
> embed Ruby, but YMMV...
>


As a follow up: Rubinius, an alternative Ruby virtual machine written in
C++, should be much easier to embed than the standard MRI interpreter.

It's not exactly "prime time" material for advanced Ruby applications but it
should certainly be enough to handle basic Ruby scripting capabilities in
another application.

I don't have specific instructions for doing a C embed of Rubinius but if
you hop onto IRC and hit #rubinius on irc.freenode.net I'm sure they'd be
willing to help you.

--
Tony Arcieri
Medioh! A Kudelski Brand

Reply With Quote
  #7 (permalink)  
Old 02-09-2010, 01:48 AM
Schala Zeal
Guest
 
Posts: n/a
Default Re: Honest opinion needed...

I took a look at Rubinus and it doesn't support Windows, my primary
audience.
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #8 (permalink)  
Old 02-09-2010, 03:17 AM
Tony Arcieri
Guest
 
Posts: n/a
Default Re: Honest opinion needed...

[Note: parts of this message were removed to make it a legal post.]

On Mon, Feb 8, 2010 at 6:48 PM, Schala Zeal <schalaalexiazeal@gmail.com>wrote:

> I took a look at Rubinus and it doesn't support Windows, my primary
> audience.
>


Honestly if you're looking for a language which embeds easily into C/C++
programs I think Lua is the way to go.

--
Tony Arcieri
Medioh! A Kudelski Brand

Reply With Quote
 
Reply

Popular Tags in the Forum
honest, needed, opinion

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Honest opinion needed... David Masover Newsgroup comp.lang.ruby 0 02-08-2010 02:22 AM
Re: Honest opinion needed... Schala Zeal Newsgroup comp.lang.ruby 0 02-08-2010 01:02 AM
Re: Honest opinion needed... Bill Kelly Newsgroup comp.lang.ruby 0 02-08-2010 12:15 AM
confuse with OptionParser -h opinion Zhenning Guan Newsgroup comp.lang.ruby 1 10-12-2009 10:18 AM
Re: SQL Optimization help needed Sridhar, Nagakumar Newsgroup comp.soft-sys.sas 0 04-02-2007 03:02 PM



Language 1 | C | C++ | Php | Python | Lisp | Perl | Ruby | Java | Pascal | Basic | Language 2 | Databases | Oracle | Mysql | Access | Drupal
All times are GMT. The time now is 07:08 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.