Why did RPG Maker use Ruby?

Discussion in 'Product Discussion and Support' started by Romanticist, May 31, 2019.

    Tags:
  1. Romanticist

    Romanticist Veteran Veteran

    Messages:
    206
    Likes Received:
    110
    First Language:
    English
    Primarily Uses:
    RMVXA
    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: May 31, 2019
    #1
    Wavelength and Marquise* like this.
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,683
    Likes Received:
    6,595
    Location:
    Germany
    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.
     
    #2
  3. MushroomCake28

    MushroomCake28 KAMO Studio Veteran

    Messages:
    1,803
    Likes Received:
    3,225
    Location:
    Montreal, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Yeah, Ruby was popular in Japan at that time.
     
    #3
    Wavelength likes this.
  4. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    ruby is also much more friendly towards 12 yr old kids wanting to make rpgs :p
     
    #4
  5. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,057
    Likes Received:
    10,702
    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.

    I've moved this thread to Product Discussion and Support. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #5
  6. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    4,014
    Likes Received:
    10,161
    Location:
    Czech Republic
    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.
     
    #6
  7. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,057
    Likes Received:
    10,702
    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.
     
    #7
    Romanticist, Wavelength and ?????? like this.
  8. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    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.
     
    #8
    Romanticist likes this.
  9. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,057
    Likes Received:
    10,702
    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.
     
    #9
    Romanticist, ?????? and Wavelength like this.
  10. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,490
    Likes Received:
    5,097
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    try libgosu dot org

    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". 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.

    Other languages are more powerful than Ruby (I tried JS and I agree). Ruby is just simpler.
     
    #10
    Romanticist and Wavelength like this.
  11. MushroomCake28

    MushroomCake28 KAMO Studio Veteran

    Messages:
    1,803
    Likes Received:
    3,225
    Location:
    Montreal, Canada
    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.
     
    #11
    Romanticist likes this.
  12. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    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.
     
    #12
  13. Romanticist

    Romanticist Veteran Veteran

    Messages:
    206
    Likes Received:
    110
    First Language:
    English
    Primarily Uses:
    RMVXA
    What about C#? I think Unity uses it and it's probably the most popular engine out there.

    I have seen Gosu but haven't seen anything substantial made with it.

    Haha yeah, sometimes I forget that game making in RPG Maker is a very different experience compared to other engines.

    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

    If it wouldn't be too hard to explain, what can Javascript do that Ruby cannot? Aside from easy porting to other systems.
     
    #13
  14. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,490
    Likes Received:
    5,097
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    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.

    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.
     
    #14
  15. TheSorcerer

    TheSorcerer Villager Member

    Messages:
    19
    Likes Received:
    62
    First Language:
    English
    Primarily Uses:
    RMVXA
    Probably the same reason we use whatever languages we do, because we are comfortable with them.


    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: May 31, 2019
    #15
    Windows i7 likes this.
  16. Romanticist

    Romanticist Veteran Veteran

    Messages:
    206
    Likes Received:
    110
    First Language:
    English
    Primarily Uses:
    RMVXA
    Well, I'm not completely anti-mobile. I don't play many mobile games anymore, but I used to play gacha games. I loved Fire Emblem Heroes and Love Live was admittedly a guilty pleasure.
    But I never really thought of them as "games". Yes, they are games, but they were no more than time killers. Similar to flash games tbh.
    Games like RPGs, especially action RPGs, or any other sort of action games that require button layouts, are godawful on phones, in my opinion. The virtual buttons cover a good portion of the screen and then my fingers are blocking the gameplay, but my phone isn't very big to be fair. Also, not having tangible buttons feels wrong in a way.

    Whoa that's pretty neat. I wonder if any RM games have taken advantage of these kinds of effects? I know MV can implement stuff like Live2D too which now that I think about it is probably possible due to JS.
     
    #16
  17. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    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 :)
     
    #17
  18. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    4,014
    Likes Received:
    10,161
    Location:
    Czech Republic
    First Language:
    Czech
    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.
     
    #18
  19. Windows i7

    Windows i7 Veteran Veteran

    Messages:
    328
    Likes Received:
    1,011
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    #19

Share This Page