Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Ruby Discussion
- - By wanderinweezard Date 2014-06-06 01:20
So I made a simple "game" with Ruby and Gosu:

Github

I use quotes around game, because really - I guess it's good for a beginner, but it still has a lot to add. (as noted in the top of the ranger.rb file in comments).  Special effects, waves to the enemies, powerups, high score memory, etc... 

My friends asked to see it in action, so I looked into deploying my game so they could run it.  The result of that search (and attempt to get Ocra to work) - I finally worked up the courage to ask a question that's been bugging me.

Why are you folks (those who are) using Ruby?
What are your goals that you are aiming for?

A little context for my state of mind:
+ It seems Ruby is reasonably capable (Spooner's Wrath game seems pretty impressive to me).
+ I do have to say that Ruby is probably the most favorite language of mine.
+ Gosu is an AWESOME library to use.

In regards to other languages...
  + Python: isn't bad, somewhat comparable to Ruby
  + Lua: ....
  + C#: eh... meh.. okay
  + C++: I get it (sorta) and hey - Gosu has a C++ version!
  + Java: Honestly, Java makes me want to hurl

Here's the thing - I understand the learning process.  Learning game development really isn't that much different than learning another skill I think.  You start off simple (Get a window to appear, then get an image to appear on that window, then make that image move, etc...)..  You DON'T start out with "I'm going to write Final Fantasy VI or I'm going to write Castlevania".... 

But - based on general searches on this forum - it doesn't appear that I can use Ruby to:
  + deploy to iOS
  + deploy to Android
  + deploy to other computers (unless I get Ocra or Releasey to work)
  + deploy on Steam/game services/etc
 
I don't know if any of these are even a goal I have, but it seems like Ruby isn't the language I should keep using if any of those end up as my goal.

If you made it this far, please don't take my rambling post as negative or a rant.  I really just want some context and opinion.  Based on what I'm seeing and experiencing, Ruby is great for prototyping - but it doesn't seem like Ruby is great if you want to get serious. 

So is there any point in actually keeping on with Ruby (other than it rocks as a language and to keep learning basic "game dev" skills)?  Should my mindset be that Ruby is just that (game prototypes and learning)?

Chime in please - let me know your thoughts.  Reading old posts isn't getting me very far.
Parent - - By lol_o2 Date 2014-06-06 11:42 Edited 2014-06-06 12:10
I made my first big game in Ruby in very first 3 months of learning how to program. See it here: http://www.libgosu.org/cgi-bin/mwf/topic_show.pl?tid=270
Ruby is very simple and friendly language, you just need to know what you want to do and there isn't much effort required to do this.
It's pretty capable of making some epic big games, see Here and There (both of them are mine)

The biggest problem are compatibility issues. With Gosu alone, it's not much problem, but for very advanced things, you need extension libraries, which are TexPlay and Ashton (and Chipmunk and some other, but I didn't use them). And these libraries tend to generate some impossible problems. You can run your game flawlessly on your computer, but the same game, packed with Ocra, will work randomly for other people. I had complains that game is running too fast, too slow or character falls through tiles. They were for one game.
These libraries are most useful for collision detecting on big maps, but you can skip them, as I done here: http://www.libgosu.org/cgi-bin/mwf/topic_show.pl?pid=6102

So that proves clearly that Ruby/Gosu is capable for more than prototyping. But your source code won't be hidden, so probably it's for some free or open source games. You can hide your code and resources, but every run, it's extracted into temporary directory, which takes few more minutes of loading.

And I had experience with other languages, especially C#/XNA. It was a terrible terrible experience, and each time I try something in XNA, I return to Gosu, because it has so simple and easy way of working, you don't even need to know how to program. And you can even use Ruby as a scripting or markup language.
Parent - - By wanderinweezard Date 2014-06-07 11:10
Is the speed an issue with Ruby and those libraries?  Or is it that you have to have to add timestep controls to your game?  (just asking)
Parent - By lol_o2 Date 2014-06-07 12:13
Speed is an issue with TexPlay and Gosu alone can lag randomly on some computers. And TexPlay or Ashton use features that won't work on some systems/graphic cards/i don't know. It may work perfectly for you, but for someone, especially reading pixels from texture may cause problems. And you can't do anything, because it happens only to the others.

And as for Ruby, C language is said to be about 100 times faster. But Ruby is fine if you don't make some advanced 3D or a MMO.
Parent - - By jahmaican Date 2014-06-06 13:17
Well, you make a valid point here and frankly, I couldn't agree more. Ruby really has these issues with portability, making monetizing your games almost impossible.

BUT playing around with Gosu made me understand all the big concepts behind game dev without much fuss and I guess it would never happen with other tools. Now I can smoothly move to something more device independant (I was looking at HTML5/JS frameworks - Phaser seems awesome!), but I'll probably always go back to Ruby for prototyping anything I'm not quite sure of.

On another thought, Ruby's popularity is still growing, so maybe (just maybe) the problems you point out are soon-to-be-ex (example).
Parent - - By lol_o2 Date 2014-06-06 13:33
There's another alternative: Gosu/C++. Maybe languave is weird as others, but Gosu functions in similar way, probably easier than XNA or most other frameworks. Sadly, I couldn't make it work.
Parent - By jahmaican Date 2014-06-06 13:56
My opinion? There are some beautiful languages, there's a lot of "okay" languages, and then there's C++. For me, thinking about using pointers and proper garbage collection would be only ruining creative process. And it's hardly standarized, I heard C++11 tries hard, but I'm not buying it. In terms of "firendlyness" you can't get much worse among object-oriented languages. It's like Ruby's exact opposite - you'll get it to work on a microwave, you can optimize everything, but it's a massive shit.
Parent - - By jlnr (dev) Date 2014-06-06 16:32
Oh wow! I haven't played around with C++/Gosu on Windows in a while, but what were the issues you encountered?
Parent - By lol_o2 Date 2014-06-07 10:27
Well,  I tried it again and it seems to work. I had problems with image constructor, just never used C++ before.
Parent - - By jlnr (dev) Date 2014-06-06 16:43 Edited 2014-06-08 09:49
1. Learning how to program, and how to structure games, which are very different from websites and GUI programs. (I wish I had more time to support projects like RubyKids.)

2. Prototyping. Ludum Dare competitions are great for this (when ocra works), and that's basically how Ruby/Gosu was born. If I felt that any of my Ruby/Gosu projects had the potential to become the next Angry Birds, all the hurdles you mention would be easy enough to overcome: By fixing ocra (and it often actually works), or by porting Ruby/Gosu to iOS via RubyMotion (should take around one day), by rewriting the game in C++ or even C#+XNA, ...
(Successful games are regularly ported across systems, anyway. I don't think much of the original Spelunky code is still in the version that's on XBLA/Mac App Store, or in the HTML5 version of Cut the Rope etc. The trick is to build a classic game in the first place :))

3. This is obscure, but I did have a little contracting gig where I built an animated kiosk/touch-screen system in Ruby/Gosu on Linux. I think it worked pretty well. If I had the time, I would advertise this as a service.

(Also, thanks for enjoying Gosu :) )
Parent - - By wanderinweezard Date 2014-06-07 11:11
Hehe - I think your last point on #2 is the hardest part of this whole hobby isn't it? ;)
Parent - By jlnr (dev) Date 2014-06-08 09:56
Unless your last name is Miyamoto :)
Parent - By wanderinweezard Date 2014-06-07 11:08
Hey thanks everyone for your responses.  It's good to get your perspectives.  That definitely helps manage point of view in terms of what to expect from Ruby.
Up Topic Gosu / Gosu Exchange / Ruby Discussion

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill