Forums Archived

The forums are being archived. See this topic for more information.

Ruby Pong

Post about games, applications, etc. made with Rubygame. Feel free to promote your own projects here!

Ruby Pong

Postby ctraut » Mon May 24, 2010 10:53 am

Hi everyone,

In the last few weeks I've been writing on a very simple Pong clone, that i want to share with you.
The game itself is rather dull, since my main goal with this project was to experiment with Rubygame and the distribution part of writing a game (or any other kind of application for that matter) in Ruby.

So I've spend a lot of time writing .deb packages and Windows installers, that you can download, in addition to the bare source-tarball, on the project page on sourceforge: https://sourceforge.net/projects/rubypong/

I hope that maybe the source code is of interest to someone who just started out with Ruby and/or Rubygame.

I would really appreciate feedback from you guys, please tell me if it works for you, if you have any problems, if I did something stupid somewhere, etc.

Thank you.
ctraut
 
Posts: 2
Joined: Mon May 03, 2010 7:24 pm

Re: Ruby Pong

Postby shawn42 » Mon May 24, 2010 4:29 pm

I don't quite have the time to fully investigate your approach. I would love to have a conversation about how you went about building a .deb and .msi for your game using Rubygame.

I have started something similar in my framework called Gamebox. It currently generates windows "packages" (a .zip containing all of ruby and a bunch of dlls)

I plan on expanding this to support OS X next, but .deb sounds interesting too. Let me know if you would like to contribute a .deb building task to gamebox. :D
User avatar
shawn42
 
Posts: 109
Joined: Tue Feb 10, 2009 8:22 pm

Re: Ruby Pong

Postby ctraut » Mon May 24, 2010 7:35 pm

I'm pretty new to Linux, that's why I became interested in writing a platform independent game with Ruby and how to go about distributing it to the end-users in the first place.
I'm still in the learning process and I don't think I am doing it "right".

My .deb package is really simple. It just installs all files that my game needs. The package depends on (among others) ruby, rubygems and sdl. After it is done installing my game and its dependencies, it runs a postinst shell script that checks wether rubygame is already installed and if it isn't, it just does a 'gem install rubygame'. The downside to this approach is, that it doesn't concern with the rubygame version. So if you have a really old rubygame installation, the script won't install a newer one and my game might not run. But I will probably fix that soon, if I have some time.

On Windows, I couldn't come up with an elegant way of installing my game either, so I did something similar to what you did and just packed up a stripped down version of the ruby interpreter with all gems and all required dlls and install them alongside with my game into its program folder. Then the installer creates shortcuts on the Windows desktop and the users program menu that run the rubyw.exe, I installed, with my game's main.rb file as an argument. This has the obvious downside, that I always distribute a full ruby interpreter and all SDL dlls with my game, regardless of wether the user has any of those already installed. Also my Windows installer is pretty bloated, about 7 MB.

I'm totally open to suggestions how I can can improve this, but until now that's the best I could come up with.

I currently don't directly support OS X either. For the simple reason that I just don't have a mac and never had one. But a friend of mine wrote a FreeBSD port for the game and it works really well.

And I would love to contribute to your project, but I fear I'm not really that qualified for it, still being new to all this. :D
ctraut
 
Posts: 2
Joined: Mon May 03, 2010 7:24 pm

Re: Ruby Pong

Postby shawn42 » Mon May 24, 2010 8:54 pm

I've never created a .deb, therefore you are much more qualified than I. Maybe we can piece something together for Gamebox and iteratively improve it?

I'd recommend getting familiar with git and github. You can easily fork gamebox, play w/ the rake tasks and send me a "pull request". It's quick and easy.

I welcome anybodies help; always. :D
User avatar
shawn42
 
Posts: 109
Joined: Tue Feb 10, 2009 8:22 pm


Return to Creations

Who is online

Users browsing this forum: No registered users and 1 guest

cron