So Ruby is an interpreted language, no compilation. The code is there, right in the .app package (if you're on a mac).
Is there any way to protect your code, aside from using an obfuscator?
There's no way to do it that can't be trivially reverse engineered. That's what copyright law is for, though.
I was thinking more about users actually editing the code, which could cause.. well, strange things!
Well, unless your game is networked and poorly protected, the worst they are going to do it have a broken game if they edit it. And I don't think many of them would think this was your fault!
Yeah, that's what I thought!
That is how kids learn to program! ;)
haha yeah I hear it is :P
Doesn't matter if you have .app (OSX) or .exe (windows), it is easy to extract your code from the release.
Bear in mind, however, that most Rubyists quite happily have reams of code in public repositories: Everything from the Ruby source code to Rails to Gosu... Somehow we all have no problem with that and don't assume our code to be so fabulous that it will tempt people to rip it off and, in fact, mostly quite happy for that code to be re-used by others. Not sure what makes your code in particular so precious? (Sorry, but this is a question often asked and I always struggle to understand it really).
You have games with online highscores, you should know. :D
The only way to really protect that is for the server side to have complete control.
The only thing I've learned from having online highscores, is that barely anyone plays my games (but that didn't come as a great surprise :D).
jlnr is right, maybe you want to protect not the code, but what the code does.
Not sure if this is still an issue for you or not, BUT, from what I've been looking into, it may be possible to just run your game in Rubinius instead of MRI, then use the built in compiler. Now, how to run the game from there is beyond me, but in theory it *should* work.
Or JRuby, if you can use a Java library, like Slick, instead of Gosu. Not sure if Gosu works with Rubinius, but Rubinius doesn't work (well enough) on Windows, for what it is worth.
True. I wrote a Gosu game that runs really well in Rubinius, so Gosu is at least workable in it. Or at least on Mac it is :/ I haven't tried Gosu with JRuby, but I'd assume it wouldn't work. I do have a game in JRuby though if anyone wants to go 3D! https://github.com/jwoertink/waves
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill