Can it be done? Or has it been done already?
I guess using OCRA???
Steam doesn't require an API unless you're using their achievements system or integrating features to interact with the Steam interface whilst your game is playing. All you basically need to do is send them your game and they can add it for downloading. If you have cross-platform version of the game, they will manage the sorting on their end for people to download the game on their computers respectively.
If a Gosu game became big & serious enough for Steam and if Ocra were a problem, one could probably still port it to C++ in a matter of days. I wouldn't worry about it...(& we only know after someone tries :) )
The only forseeable problem is that steam games must be a stand-alone executable. (I forgot Valve's exact wording, but that's what I understood of what was on their site.) This is why there are some games built in flash for sale on Steam, but they have to be contained in an .exe wrapper to be vended.
I think if you use Gosu with C++ there's no problem right? :)
Right. It must be self-contained, I believe. (i.e. not external files like "media" or "sound" or "maps" but all bundled in the final executable)
Contact Steam if you have any questions regarding their policies on this.
I don't see why not, but for it to be cross-platform, you could probably use Ruby2EXE
I don't really understand the problem here. If Ocra creates a .exe, Steam should be fine with it, right?
Ocra temporarily installs your application along with the Ruby interpreter every single time you run it. There are three main problems with that: it could take a long time for a large game to start up; creating -- and running -- executable files under appdata could be seen as a security risk; and the player may end up facing a firewall pop-up every single time they launch the game, which would be rather annoying.
Unfortunately, I think the best answer to the OP's question -- at the moment at least -- is to either try and get Crate up and running; re-write in C++; or roll your own solution.
See, if I were designing ocra myself, I would have linked with a static libruby, catted a tar archive containing the user-supplied scripts and only the absolutely necessary Ruby libraries to the end of the executable and overridden require with a custom version that searches that archive instead of looking elsewhere on the system. But I'm sure there's a reason I didn't design ocra.
Solution may be copying Ocra's generated folder into game's directory, making a batch file that runs game through included interpreter and then using Clickteam's tool
to create one-exe installer.
Spooner's Releasy can also package your game by just dropping your script right next to an all-in-one Ruby EXE, if that helps.
That's almost exactly what Realeasy does, IIRC, and Ocra also has a mode that creates InnoSetup installers.
Ocra can be useful, but something more like Crate or Py2exe would probably be more so.
Yes, Releasy just wraps the Ocra/Innosetup system up and makes it considerably simpler to use (or that is the intent :) ).
This is exactly what I did in my competition game, and they didn't hate it. :D
Wait a minute... How could we have forgotten about JRuby?! It is a reliable solution even for distributing Ruby apps as standalone jars; the end user only has to have Java installed.
I think the reason we've forgotten about it is because Gosu doesn't (and can't easily be made to) work with it.
As Eris pointed out, you wouldn't be able to use Gosu -- I recall stumbling across a Google Code project that was meant to be porting Gosu to Java, but I'm not sure whether or not it ever got anywhere.
You could certainly use JRuby to write a game, and it would be a lot easier to ship it, but you'd have to use Rubygame or Slick2d.
(also @erisdiscord) Why not? I didn't know that... :/
JRuby is written in Java and runs on the Java VM, so any C extension support would most likely have to be a wrapper around JNI.
experimental support for C extensions in the latest version, but experimental's the keyword here: most libraries that use it aren't quite working yet and there's no guarantee it won't crash. The more non-trivial a library is (Gosu is very non-trivial; most SWIG-generated bindings are), the less likely it is to work.
Also, I'd be surprised if JRuby's extension support is binary-compatible with MRI; you probably have to recompile. It's pretty hard to actually find any information about it, though.
You can install JRuby on OS X with rvm and then do
gem install gosu --platform ruby
. The source gem can be built on OS X specifically for trying out other Ruby interpreters.
I think I tried it on JRuby and didn't even understand the error message. But I made the Tutorial work on Rubinius and MacRuby once! ;)
Powered by mwForum 2.29.0 © 1999-2013 Markus Wichitill