Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu Exchange / How do you actually distribute your finished Ruby game?
- - By Omegas7 Date 2012-06-28 00:55
Ocra packs your ruby game in an executable, which is great. But every time you open it, it will extract and install ruby interpreter and then run the game... which is slow even for small games.

My game is written in Ruby. I want to use Ruby. But there doesn't seem to be an actual proper way to distribute my game. But given that there are some Ruby game developers using gosu out there, well, I assume there *is* a way, is there not? What do you do?
Parent - - By Spooner Date 2012-06-29 03:11
Releasy (by me), using the :windows_folder or :windows_installer or :windows_wrapped option, will create a non-extracting version! That is, you get a tiny .exe that is just there to start everything up and all your files + ruby are zipped up with it - which means it starts faster and doesn't use space in your temp folder. Obviously, you don't get the advantage of distributing as a single file, but frankly that isn't as important as people think and Releasy makes compressing your game even easier :)

:windows_wrapped can even be built on OSX/Linux and Releasy will make building an OSX executable as easy as making a Windows one.

Sadly, Releasy is still a bit hard to use, so please visit the #gosu forum and I'll try and help you pack up your game with it, though you might get somewhere looking at games of mine or those others who have packed games with it.

Parent - - By Omegas7 Date 2012-06-29 05:51
#gosu forum? Isn't that... here? XD

Currently I am working on rewriting almost everything in the game to optimize stuff etc... but it will be great to learn how to use Releasy.
Parent - - By Spooner Date 2012-06-29 10:31
Sorry, I meant the #gosu IRC channel :$
Parent - - By Omegas7 Date 2012-07-03 16:47
One more question!

I heard that since Ocra self-extracted things to a temp folder, it was possible for users to, well, take a look at all the source and resources used in the game. Can Releasy err, stop that from happening?
Parent - - By Spooner Date 2012-07-03 16:52
No, it is impossible to hide your sources in CRuby. You can, however, release compiled Java bytecode files with JRuby or other compilable versions of Ruby (Maybe in CRuby 2.0 we'll get this; I think it is on the cards for us to save bytecode, but don't quote me on that and it will be a few years before it happens :( ).

If you think that your code is so good that people will steal it, you are a better coder than me. If you think people shouldn't learn by freely looking at your code, then you are a worse person than me :D
Parent - - By erisdiscord Date 2012-07-03 18:46

> If you think that your code is so good that people will steal it, you are a better coder than me. If you think people shouldn't learn by freely looking at your code, then you are a worse person than me :D

This, a thousand times. I think you've summed up my philosophy on, well, pretty much any creative endeavour. I take it one step further and license everything I release permissively, but I won't hold it against anyone who chooses not to take that extra step. C:
Parent - By Spooner Date 2012-07-03 23:22
Most of us host our code at Github or similar, so trying to keep readable files out of releases seems like closing the gate after the horse has bolted :)
Parent - - By Omegas7 Date 2012-07-03 23:47 Edited 2012-07-06 00:04
I'm not a great coder. But if I was, I WOULD BE A TERRIBLE PERSON, FWAHAHAHAHAHA..........

.... It isn't much about the code, it is about the graphics and audio I use. Is it the same case?

Oh and also, what if my game connects to a remote MySQL database? In my code, I use, well, an username and a password. If people can see the source code, they would be able to see such credentials... so making a ruby game with the ability to connect to an online database (for highscores or perhaps multiplayer features) is not impossible?
Parent - - By erisdiscord Date 2012-07-05 03:40
I definitely wouldn't recommend putting the username and password in the program and connecting to MySQL directly. If you hide your source code, even if you obfuscate it somehow, it's still trivially easy to run the application under a debugger or even open it with a hex editor and find that information. If you encrypt it, you need to also distribute the keys to decrypt, or they can't run your game at all. There's just no way to do something like that securely.

Better to hide the SQL database behind a CGI script (or better still, a web application) that can only add high scores to the table and retrieve them.
Parent - - By jlnr (dev) Date 2012-07-05 06:13
Do you know this story? Super Meat Boy did exactly that, it connected to an RDBMS directly, and the response was pretty bad.
Parent - By erisdiscord Date 2012-07-05 23:58
Oh my god, I had not seen that. :D Wow, the arrogance from the developers. That's kind of sad.
Parent - - By Spooner Date 2012-07-05 10:31
Yes, I hadn't considered that. I'd suggest creating a simple RESTclient with Sinatra to act as the safety wrapper.
Parent - - By Omegas7 Date 2012-07-06 00:11
Alright, nevermind the highscore thing for now lol.

But yeah, what about graphics and audio? Are such resources protected or are there other ways to protect them? Perhaps I don't mind people looking at the game code, but I certainly don't want them to get those resources.

Naturally,everything can be hacked I guess - so let me reformulate my question: how can I make it *very hard* at least to steal the graphics/audio I use?
Parent - - By Spooner Date 2012-07-06 00:16
Well, the standard Ocra (or Releasy :windows_standalone) methods, which self-extract, are likely to deter anyone who is a complete noob, so if you are that worried...

I'll reiterate that most commercial games have some or all of their assets non-encrypted in their releases. If they are in a proprietary format, then modders take about a week to work it out anyway.
Parent - - By Omegas7 Date 2012-07-06 05:30
When they say that opensource is the future, it is because there is no other choice anyway e___e
Parent - By Spooner Date 2012-07-06 08:51
I am not so sure. You can pay Github <$10 a month and get private repos, but open-source is pretty much a requirement of CRuby deployment though!
Parent - By jlnr (dev) Date 2012-07-06 14:53
I think having them inside the ocra exe is good enough. Even DRM-protected iPhone games are just glorified ZIP files with all the assets right in there (usually). It is pretty obvious when someone reuses your graphics for their game and plain copyright seems to work ok in this case.

Open-sourcing your game only makes it easier to cheat or to circumvent any DRM (obviously). I think this battle is lost for small developers anyway. You really need to be Blizzard and rule with an iron (online-only) hand to keep your game under control.
Up Topic Gosu / Gosu Exchange / How do you actually distribute your finished Ruby game?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill