Jump to content
  • Advertisement
Sign in to follow this  
mgarriss

anyone using Ruby?

This topic is 4810 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

anyone using Ruby for game scripting? it's the only scripting langauge i know well so it would be a natural fit for me. i'm wondering what other peoples experience with it has been (in a game setting).

Share this post


Link to post
Share on other sites
Advertisement
I really like ruby, but I had a LOT of trubble intergrating it into my game
engine, sometimes I think God made all the script api developers to punish us for our sins..

So I dropped the ruby idea and when't for a dll event system instead :)

Share this post


Link to post
Share on other sites
CoMaNdore: I know your pain, and I've contemplated the same thing.

Anyway, I've read through README.EXT in the Ruby distribution, and to tell you the truth, once you get used to the wierd translation artifacts, uneven formatting, and other such oddities, Ruby doesn't seem all that bad for integrating and extending. If I'm not mistaken, Python's C API is similar to Ruby's, so it won't surprise me if someone makes something similar to Boost::Python for the language in the near future. On the language side, it's a lot simpler to deal with things than in Lua (those tables are damn confusing for me). I've seen its use in RPG Maker XP where it is put to good effect.

My biggest complaint about Ruby is that you can't detach file services (or other OS related components) from the language, at all. (I think it's about same for Python, too.) This means that constructing a runtime sandbox for execution is harder, and security is about limited to it's tainting feature. Here, Lua is better because you are able to include only certain parts of its standard library when embedding it, and leave file services out (or code your own, if you want to use a VFS). For me, that's more of a reason to not use Ruby than its C API.

Share this post


Link to post
Share on other sites
I don't know much about ruby, but I do use python for game development on a daily basis. Usually the way it's done in python is that you write most of the game in python, and rewrite the speed-intensive parts in C/C++, which I've never actually needed to do.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I've found it very easy to use Mozilla's javascript engine (mozilla.org/js/spidermonkey). javascript is very easy to learn if you have experience with any C-like language, will be known to any modder who has played a bit with website development, and has pretty powerful features (some OO, functional programming, nice syntax for arrays and regular expressions, etc). It's no Ruby but after all the idea is to make scripts high-level and clearer than C++ code, not to RSA-encrypt a file in 5 lines of code.

Share this post


Link to post
Share on other sites
Quote:
Original post by coldacid
Trust me, Ruby is far clearer and easier to use than javascript, no matter the script engine used.

agreed! ruby is a pleasure to work with. after doing c++ for 10 years the freedom that ruby gives me is like a breath of fresh air. don't get me wrong, i still love my C++. both c++ and ruby have there places.

it doesn't seem like too many are using ruby with games. i did find
RPG Maker XP. not really what i was looking for but still interesting.

Share this post


Link to post
Share on other sites
Quote:
Original post by mgarriss
anyone using Ruby for game scripting? it's the only scripting langauge i know well so it would be a natural fit for me. i'm wondering what other peoples experience with it has been (in a game setting).

I have a friend online who uses / used Ruby quite a bit. Personally, I like Python, but it seems to work great for him. I believe he used it in making his FPS with Blitz3D a while back, so it seems to have some usage in games (EDIT - be they indie or not).

Share this post


Link to post
Share on other sites
Yeah, it's got use in games, but it's not really secure. If you worry about people making trojan mods (which include scripted maps) and killing your players' computers, you don't want to use it. On the other hand, if you don't care about that, I'd totally suggest this langauge!

Share this post


Link to post
Share on other sites
Why use Ruby just as an engine scripting language?

Writing the engine in Ruby itself! Of course, our math library is a C extension for speed, but otherwise, we don't care about bloody fast execution, we care about quick and easy development. Computers are fast enough today that for a personal or small group project, an interpreted language like Ruby is all you need, and the inherent power in using such a language means more time spent extending and less time debugging.

[rant]
Personally I've come to loath C++. It is way too strict, way too old, and just needs to be thrown away. If you still want comparable speed, go use C# or Java. Faster, better, easier development with fewer bugs.

C++ is the past. Interpreted and half-compiled languages are the future.
[/rant]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!