|
|||
|
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/. |
|
|
||||
|
||||
|
|
|
|||
|
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/. > > |
|
|||
|
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! |
|
|||
|
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/. |
|
|||
|
[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 |
|
|||
|
[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 |
|
|||
|
I took a look at Rubinus and it doesn't support Windows, my primary
audience. -- Posted via http://www.ruby-forum.com/. |
|
|||
|
[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 |
|
|
![]() |
| Popular Tags in the Forum |
| honest, needed, opinion |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Honest opinion needed... | David Masover | Newsgroup comp.lang.ruby | 0 | 02-08-2010 01:22 AM |
| Re: Honest opinion needed... | Schala Zeal | Newsgroup comp.lang.ruby | 0 | 02-08-2010 12:02 AM |
| Re: Honest opinion needed... | Bill Kelly | Newsgroup comp.lang.ruby | 0 | 02-07-2010 11:15 PM |
| confuse with OptionParser -h opinion | Zhenning Guan | Newsgroup comp.lang.ruby | 1 | 10-12-2009 09:18 AM |
| Re: SQL Optimization help needed | Sridhar, Nagakumar | Newsgroup comp.soft-sys.sas | 0 | 04-02-2007 02:02 PM |