Why did RPG Maker use Ruby?

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
Out of curiosity, why did RPG Maker use Ruby? People did some really cool things with RGSS, but there are hardly any games outside of RPG Maker that use Ruby. I couldn't find an answer to this but I'm quite curious. Another way of asking this is, why don't/didn't other engines use Ruby?

I can understand why MV (the mobile version) would use Javascript, though I wish it didn't because I would never make a browser or mobile game honestly (I'd be more inclined to make a mobile game than a browser game though I still prefer games optimized for computers), but Ruby, from my limited knowledge, was never meant to be a game language. I've seen people on game dev forums in the past criticize RPG Maker for using Ruby as a bizarre scripting choice; I mean, Ruby obviously worked, but they'll say that XP/VX/Ace games would have run faster using another language, like C++ or something. Or even Python.
Personally, although I still cannot code on my own, I've gotten the hang of making simple edits to scripts, and Ruby (or at least RGSS) seems very simple compared to some other languages; for example, I don't have to add a ; after every single line, which is nice :p Not to mention no need for tons of brackets.

But anyways, I guess my question is clear so I'll leave it at that.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,255
Reaction score
7,138
First Language
German
Primarily Uses
RMMV
There is a big problem with using C/C++ for things like RPG-Makers:
C/C++ are usually compiled languages - Ruby/RGSSx runs as an interpreted language.
And for the target audience an interpreted language is better, but C/C++ would loose a lot of its power if it would use an interpreter instead of a compiler. In fact I would bet that C/C++ in an interpreter environment would run much slower than Ruby/RGSS - much of the speed of C/C++ comes from the direct access to assembler-level commands that are difficult to use outside of a compiler.

That said, the RMs were originally japanese programs that were only translated and distributed internationally as an afterthought. In fact RMMV was the first one where all language versions were developed at the same time, and the original translations of RM95 and RM2K(3) were pirate translations. And if I was informed correctly Ruby was much more common in japan at the time of RMXP than it was internationally or now.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,993
Reaction score
11,299
First Language
English
Primarily Uses
RMVXA
General Discussion is for looking at broad themes connected with the actual making of games, not the history of the engine.
[move]Product Discussion and Support[/move]
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,103
Reaction score
10,488
First Language
Czech
Primarily Uses
RMMV
@Andar Actually, I don't think interpreted C++ would be slower than interpreted Ruby. Interpreters need to translate to machine code, so even Ruby interpreter is usually written in C or C++ or Delphi. The main problem with C and C++ is, it's a static language and extremely difficult to master. I can't even explain how much headache I have programming things in C++ compared to Javascript. You can't use undefined values, have to manage memory, alias of a function is rather impossible, because C++ doesn't have a call method, functions have only one return type,... And more and more problems.


And why doesn't MV use Ruby? Well, probably because RGSS, the engine necessary for making games in Ruby, is rather limited. Also, nwjs allowed for a relatively easy way to make multiplatform games.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,993
Reaction score
11,299
First Language
English
Primarily Uses
RMVXA
@Poryg A very straightforward reason for the switch was because Enterbrain (as it then was) tried using Ruby to make a mobile game, and it failed dismally. I know, because they used one of my games as their pilot project, and it was a buggy mess which couldn't play at all on some mobiles, and which couldn't meet the QA requirements for Apple.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,339
Reaction score
2,502
First Language
Binary
Primarily Uses
RMMV
@Kes I remember hearing rumours about them working on porting ace to mobile. I guess that would have been your project they were porting :D

There are ruby interpreters for mobile (ruboto for example), but I imagine the bugs that vx ace had only got multiplied tenfold when trying to run from mobile hardware.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,993
Reaction score
11,299
First Language
English
Primarily Uses
RMVXA
@?????? I suspect it was more than tenfold. The final killer was the fact that every manufacturer of an Android phone has their own version of the Android OS to take account of their spec. Ruby simply couldn't cope with that sort of variety. I worked with the porting team for months on it, and I know it was tried out on several different phones, but it couldn't be tested on all brands and models, so when it was released on the Google store, bug reports came flooding in. Most of them blaming me as the developer. That was a bit galling, I must admit.

However, although they never said anything directly to me, I suspect that it was that experience which finally pushed them into dropping Ruby.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,267
Reaction score
6,012
First Language
Indonesian
Primarily Uses
RMVXA
but Ruby, from my limited knowledge, was never meant to be a game language.
try libgosu dot org

I've seen people on game dev forums in the past criticize RPG Maker for using Ruby as a bizarre scripting choice;
They are not wrong. People who dev a game straight from the code and make their own UI are totally in a different plane than the rest of RM people who barely could code. And I don't think they would understand each other.

I mean, Ruby obviously worked, but they'll say that XP/VX/Ace games would have run faster using another language, like C++ or something.
They might forget the RM target audiences. First of all, it started in Japanese. And it was never meant to be a professional game engine, but for a hobbyist (although of course, you can sell your game). And as Dekita said, "Ruby is much friendly for 12 y/o kids". Then ppl yelled that they want mobile port, and they had no choice but to step up to hear their market. So they pushed toward using JS.

Another way of asking this is, why don't/didn't other engines use Ruby?
Other languages are more powerful than Ruby (I tried JS and I agree). Ruby is just simpler.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,218
Reaction score
4,350
First Language
English
Primarily Uses
RMMV
Also let's not forget that to run a 2D rpg maker game, you don't need that much horse power. Ruby was more than enough for the typical use case.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,339
Reaction score
2,502
First Language
Binary
Primarily Uses
RMMV
@Kes Yea, I can imagine that experience to be quite disheartening for all parties involved :(

At least with mv mobile porting is easy, I can legit make changes to my game, and be testing them on mobile within a minute (as demonstrated in my recent tutorial)..

TBH, I wasnt sure about the choice of javascript at first... But now, almost everything I write is in javascript (not just rpg maker games, but websites, and apps for both mobile and pc) - its extremely versatile.
 

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
@AndarI can't even explain how much headache I have programming things in C++ compared to Javascript. You can't use undefined values, have to manage memory, alias of a function is rather impossible, because C++ doesn't have a call method, functions have only one return type,... And more and more problems.
What about C#? I think Unity uses it and it's probably the most popular engine out there.

try libgosu dot org
I have seen Gosu but haven't seen anything substantial made with it.

They are not wrong. People who dev a game straight from the code and make their own UI are totally in a different plane than the rest of RM people who barely could code. And I don't think they would understand each other.
They might forget the RM target audiences. First of all, it started in Japanese. And it was never meant to be a professional game engine, but for a hobbyist (although of course, you can sell your game). And as Dekita said, "Ruby is much friendly for 12 y/o kids".
Haha yeah, sometimes I forget that game making in RPG Maker is a very different experience compared to other engines.

Then ppl yelled that they want mobile port, and they had no choice but to step up to hear their market. So they pushed toward using JS.
Indeed, I do hear that mobile gaming is HUGE in Japan. But I don't see the appeal; the lack of buttons really kills the enjoyment for me :rswt

Other languages are more powerful than Ruby (I tried JS and I agree). Ruby is just simpler.
If it wouldn't be too hard to explain, what can Javascript do that Ruby cannot? Aside from easy porting to other systems.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,267
Reaction score
6,012
First Language
Indonesian
Primarily Uses
RMVXA
Indeed, I do hear that mobile gaming is HUGE in Japan. But I don't see the appeal; the lack of buttons really kills the enjoyment for me :rswt
Most of it just collectible gacha games. And you don't really need buttons to do so. But still, many people I know switched to mobile gaming, including my big brother who was avid of PC games and also anti-mobile game. But look at him now, he switched to a mobile game in the end because he barely has time to play on PC anymore.

If it wouldn't be too hard to explain, what can Javascript do that Ruby cannot? Aside from easy porting to other systems.
For the starter (and the simplest explanation): https://pixijs.io/pixi-filters/tools/demo/ (Yes, you can use it in MV)

And for the technical part, JS uses 'prototype' instead of 'class' (Granted, in ES6, you can use class notation, but afaik, it just a notation, a syntax sugar). And you can add whatever variable you want in an object on the fly without worrying about a syntax error.
 

TheSorcerer

Villager
Member
Joined
Jan 27, 2019
Messages
19
Reaction score
63
First Language
English
Primarily Uses
RMVXA
Probably the same reason we use whatever languages we do, because we are comfortable with them.


There is a big problem with using C/C++ for things like RPG-Makers:
C/C++ are usually compiled languages - Ruby/RGSSx runs as an interpreted language.
And for the target audience an interpreted language is better, but C/C++ would loose a lot of its power if it would use an interpreter instead of a compiler. In fact I would bet that C/C++ in an interpreter environment would run much slower than Ruby/RGSS - much of the speed of C/C++ comes from the direct access to assembler-level commands that are difficult to use outside of a compiler.
Hmmm. Interpreters are often originate a C++ themselves because of the sheer speed that the executable runs. C++ gets compiled to assembly. You can't get any faster than that (not even if you write the assembly by hand). The compiler knows more about the nitty gritty of CPU architecture than we can ever hope to get close to. I can provide many examples of hand written assembly compared to what the compiler spits out, where you 'think' you have hand written the fastest code possible.

A quick example to quit a program in assembly.

Code:
// logical way of exiting (i.e. Return 0)

mov eax, 0
push eax
call ExitProcess

Compilers way of doing it

Code:
xor eax,eax
push eax
call ExitProcess
The compilers way is both less bytes and less instructions for the CPU to execute (i.e. faster)

Sorry for going off on a tangent. LOL. But just an example on how you won't beat C++ as an 'interpreter'.
 
Last edited:

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
.
 
Last edited:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,339
Reaction score
2,502
First Language
Binary
Primarily Uses
RMMV
I've seen live 2d implimented in mv, yes, pixi filtering is also possible. I recently found a 'dragonbones' battler plugin which is pretty spiffy too :)
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,103
Reaction score
10,488
First Language
Czech
Primarily Uses
RMMV
What about C#? I think Unity uses it and it's probably the most popular engine out there.
The only problem C# eliminates from the ones I have mentioned is garbage collection, the rest still remains.
Plus some new problems:
1. Only apps with at least a particular version of net framework can launch the game
2. There are no global variables, everything has to be done via classes.
 

Windows i7

Veteran
Veteran
Joined
Nov 4, 2017
Messages
395
Reaction score
1,193
First Language
English
Primarily Uses
RMMV
The only problem C# eliminates from the ones I have mentioned is garbage collection, the rest still remains.
Plus some new problems:
1. Only apps with at least a particular version of net framework can launch the game
2. There are no global variables, everything has to be done via classes.
On your second point, the equivalent of global variables can be done in C# with namespace and static classes so that isn't an issue at all.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Any commercial devs here ever mess with Gamejolt? Been contemplating making my games available there but don't know if it's worth the effort or not.
Social distancing taught me of how much of not a loner I am. Dammit, I miss seeing my friends...
Happy 4th of July all. Anybody have plans? Mine here is staying home away from the virus. Still a nice 3 day weekend.
The project I am working on is going great at the moment. I'm hoping everyone is having as successful a time as I am. :)
Waiting for RPG Maker VX Ace to also go ON SALE on this site, cause honestly, I don't want to buy it on Steam.

Forum statistics

Threads
99,255
Messages
963,528
Members
130,844
Latest member
Nivax
Top