News for hackers. Stuff that matters.
Re:Ray, a Ruby game library by qbleep on Sunday July 17, 2011 @04:29PM (#2774116)
This looks nice. I'm always excited to see higher level languages being used for scripting games. Lua is awesome at what it does but I've never really liked the syntax and lack of real objects. Building objects on top of Lua tables has always felt like such a hack to me personally.

The one thing that always concerns me with Ruby engines, however, is distributing the un-obfuscated ruby files with a game. In a single player game, with no online leader-boards or other concerns of cheating it's fine. But in a game where someone might be tempted to cheat this just makes it too easy. I know obfuscating / compiling code isn't very strong security against cheating but it's a huge step up from distributing source files ready to be edited.

Engines like Love2D (maybe other Lua based engines too, I haven't tried) allow you to compile your lua scripts and distribute the compiled versions.

With Ruby I guess the options would be to make a Java game engine with JRuby then you're just distributing JVM bytecode. Or maybe building a native engine in c (like this one) but including Rubinius to run compiled Ruby code. Rubinius has a blog post suggesting that this should be possible (http://rubini.us/2011/03/17/running-ruby-with-no-ruby/)

I'd love to see a game engine on Ruby with code obfuscation built in.

Re:Ray, a Ruby game library by Mon_Ouie on Sunday July 17, 2011 @06:20PM (#2774364)
Just in case you (or someone else) would like to know, Ray has been tested with both JRuby and Rubinius.
Re:Ray, a Ruby game library by extension on Sunday July 17, 2011 @06:26PM (#2774379)
If you use Ruby 1.9, I'm pretty sure there's a way to distribute it as YARV bytecode.

EDIT: I guess not http://redmine.ruby-lang.org/issues/971 Anybody know why this was closed?

Re:Ray, a Ruby game library by chc on Sunday July 17, 2011 @08:22PM (#2774622)
Ko1's response implies that they don't yet feel ready to commit to a set bytecode for YARV and don't want to support this feature until it will have some measure of portability.