Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How similar is Ruby to C or C++?

I'm pretty familiar with C++ and I'm taking a class on C right now. About how hard do you think it would be for me to learn Ruby?
 
In my opinion, it should be very easy for you. Starting from a good C++ or Java (C++ better imho) and with a clear understanding of objects, inheritance, and pointers (imho) you should be able to figure out how to do almost everything in a few days, and to do it in a couple of weeks of full study. You only need a good guide.
But, if we are talking about RMXP's RGSS full understanding... or about setting up a MMORPG server... well that's totally another matter.
 
Well I learn C# based on RUBy so if you already know a Languge it will be very easy to learn another one. so lets say a 2 weeks and you are ready to script yiur own Battler System :D
 

khmp

Sponsor

There are some things you'll notice right away if you come from that background. No defining types. No more 'int n_x' just 'n_x'. No more semicolon. I still catch myself doing that :). No postfix or prefix notation '++/--'*miss that*. Looping behaviors are extremely similar. Although Ruby makes iterating through like elements really easy. Every conditional, loop statement must have a corresponding end, even if it's one line.

Eg.

Code:
C/C++/C#
[legal]
for (int i = 0; i < max; i++)
 do_stuff

Ruby
[illegal]
for i in 0..max
 do_stuff

[legal]
for i in 0..max
 do_stuff
end

Those are just some things that to me keep tripping me up so just a heads up from point of view. Definitely though this link will cover your question better:
http://www.ruby-lang.org/en/document...from-c-and-c-/
 

Anonymous

Guest

I used C++ alot before so was pretty easy to learn ruby/rgss
and ruby is easier for me, but ruby has a lot of ends where C++ doesn't.
 

Khala

Member

But the script language to this is rgss, based on ruby and a little different.
:D

Mostly the same though, think of the language as Ruby made into game freindly.
 
I came from a background of both C++ and Java, and picked up Ruby pretty quickly, mostly on my own. I studied the RGSS and read the help file mostly. I still have to look up some of the syntax on occasion (the for loop threw me off for a while)
Honestly I think the Java helped me more, but I never did anything graphical in C++.
 
Chaosg1;279954 said:
Well I learn C# based on RUBy so if you already know a Languge it will be very easy to learn another one. so lets say a 2 weeks and you are ready to script yiur own Battler System :D
I know HTML:D But I didnt learn RGSS in 2 weeks. How should this came?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top