Skip to main content

News

Topic: RPG Maker MV "They finally ditched Ruby for javascript!"  (Read 17133 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Rukiri
  • [*]
RPG Maker MV "They finally ditched Ruby for javascript!"
http://www.rpgmakerweb.com/products/programs/rpg-maker-mv

You should be able to import external libraries to a certain degree, so you probably can use tiled to create your maps instead of the built in editor.
Tile Size was bumped from 32x32 to 48x48, but there's a plugin that will allow you to use 32x32 or 16x16 tile resources.

It also uses javascript, no word on which implementation though but a good guess is ECMAScript 5. 

It also has Mobile (iOS and Android) and Mac support as well as Windows! No Linux sadly even as a target... but there is a html5 target though.
  • Last Edit: August 08, 2015, 08:36:00 pm by Rukiri

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #1
I feel like everyone is finally coming to the conclusion I did long ago: JavaScript is an excellent language for writing games.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #2

I feel like everyone is finally coming to the conclusion I did long ago: JavaScript is an excellent language for writing games.


Yep. I agree. It's in fact a very good well rounded language whose only fault is being typeless. But there it typescript to remedy that and other compile-to-JS languages that add that.

I say typeless is a draw because that is one key thing that keeps bugging me. Without a strict typing system I've found it hard sometimes to manage the code as well as I do my C#. But it is a blessing at times, don't get me wrong, but type checking becomes a bottleneck in JS whereas in typed languages it doesn't natter as much. Imagine a call that has been "overloaded" in JS, well to do that you must create multiple conditions that satisfy each different signature. In CoffeeScript or other languages like it, you may not realize it has to do this behind the scenes and so bloats your code with lots of boilerplate of which can slow down the execution speed of the code you were trying to write.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #3
I find the typelessness isn't a big issue in practice.  JS does have a few primitive types that complicate matters, but for the most part you end up just passing around a bunch of object literals.  What it comes down to is that you have to get into the duck-typing mindset (if it looks like a duck and quacks like a duck, then it's totally a duck regardless of what you want to believe) rather than thinking about concrete types.  This focus on objects is represented in my design for the Sphere Studio debugger, in fact: The variable viewer is a large textbox with the full JSON text of the object in question, as opposed to MSVC where values are primarily viewed in tooltips and you need to drill down into complex objects.

I think the big missing link with Sphere in particular all this time has been exactly that, a proper debugger.  Lack of compiler-enforced typing can cause many, many weird glitches that I think would be glaringly obvious once you're able to view full objects at runtime alongside the code that uses them.  I know there were a lot of times in Specs development where I spent hours trying to track down some bug in the battle engine that would have been found in two seconds with the MSVS debugger.

I'd be curious to see if this iteration of RPG Maker will include a JS debugger.  After all these years, they should certainly have the expertise to implement it. :P

Admittedly the overload thing is an annoyance, I'll agree with that.  That's why I like dynamic in C#, because it gives you the best of both worlds.  For example, you can do this (I do exactly this in the minisphere debug plugin for communicating with Duktape, in fact):

Code: (csharp) [Select]

public void MultiSend(params dynamic[] values)
{
    foreach (dynamic value in values)
    {
        Send(value);
    }
}

public void Send(float value)
{
    // send float
}

public void Send(int value)
{
    // send int
}

public void Send(string value)
{
    // send string
}

public void SendStuff()
{
    MultiSend(2, "maggie", 8.12);
}


MultiSend will accept any number of arguments, of any type, and the correct overload for each individual value will be determined at runtime.
  • Last Edit: August 09, 2015, 02:21:26 am by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #4
@Lord English: Yeah, but with strict types imagine the speed increase you get if we never had to check if x is a Number or a String or whatever. The biggest speed increases that came with Chrome's V8 is it's ability to assume a value will always be used as an Integer. But of course it's hard to determine that always but if all code paths utilize variable 'x' as an Integer (say a for loop incrementor), then we can safely assume it'll always be that way. So there are those kind of optimizations a JS compiler can make. But if you typed things strictly as Int then that's what it'll always be.

Then for Math sometimes you don't get implicit conversion to Int, which can be odd at times. Of course I really only know this more moving between C# and JS. When I've programmed in JS for a while my mind makes the context switch.
  • Last Edit: August 09, 2015, 02:43:51 pm by Radnen
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #5
It's easier to deal with lack of int conversion once you internalize that JS as a language doesn't have ints at all (the bytecode may, but the language itself doesn't).  Everything is floating point.  Once you have that in mind, calling floor/ceil/round when you need an integer becomes second nature and you do it instinctively.

Not saying strong typing doesn't have a lot of merits, of course: C# is probably my favorite programming language, edging out even JS.  Which is saying a lot given how much I hate the dependency on the bloated .NET Framework. :P
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #6
Once you have that in mind, calling floor/ceil/round when you need an integer becomes second nature and you do it instinctively.


I prefer (n|0) myself.

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #7

Once you have that in mind, calling floor/ceil/round when you need an integer becomes second nature and you do it instinctively.


Unfortunately that is A) not implicit and B) an extra function invocation. I mean we are dealing with games here and in Sphere 1.5 in particular I've noticed that JS can be the bottleneck at times. Especially in my space game which is fairly math heavy (trigonometry in specific which plays nicer to floats, but still). Of course minisphere mitigates that speed loss. ;)

But it doesn't matter, typescript: http://www.typescriptlang.org/ can take care of these things for you behind the scenes (meaning you don't have to think about ceil/floor/etc. it'll do it for you, but it's still scary that perhaps the more things you treat as int's the more conversions it'll try to attempt to keep integers integers).

The perfect language for me would be a game engine that uses pure typescript and take out the middleman-compiler to JS. At least it's best of both worlds JS and well, a C#-like OOP structure.
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #8
I actually want to integrate TypeScript into minisphere (that would be another nice addition for 2.0), but unlike CoffeeScript there doesn't seem to be a standalone compiler I can embed--from what I can tell you have to install it in Node.js and then do the transcompilation to JS ahead of time, from the command line.  This could be done easily enough in Cell too, it doesn't necessarily have to be integrated with the engine, but the Node.js dependency is a buzzkill.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #9
So... MV has been out for a while and I've written some code for it, so I can talk a bit about how it works:

Basically, they tried to implement ruby inside javascript.
Everything is added to the prototype;

Plugins are replacing existing methods to simulate Ruby's aliases:

Code: [Select]

  //Updates Game_Temp.prototype.setDestination to only be executed when the player has no destination set on itself
  var oldGameTemp_setDestination = Game_Temp.prototype.setDestination;
  Game_Temp.prototype.setDestination = function(x, y) {
    if ($gamePlayer._xDestination === undefined && $gamePlayer._destinationCharacter === undefined && $gamePlayer._yDestination === undefined) {
      oldGameTemp_setDestination.call(this, x, y);
    }
  };



They kept all classes and methods from Rpg Maker Vx Ace with basically the same name, just changing snake_case for camelCase.
The whole thing runs on a lot of open source projects: The rendering is managed by and old version of Pixi.js (the new version came out just a few weeks before MV). The windows and mac run on node.js. The mobile export is just a manual explaining how to use open source tools to turn your html5 game into an app.

Debugging is finally possible, thanks to node.js (or your browser's development tools if you use it).

The whole editor is completely unnecessary if you know how to write JS code, except for drawing maps (although you can use tiled map editor for that).
While stable 60fps is achievable, performance is still nowhere near Sphere level.

Every single line of code is now visible, so the community has already started writing deep changes to it.
I feel like this might be the last version of RM as we know it, because the community can do much more for it than the 2 programmers that made it.

Here's the link to my github, with some plugins written for it: https://github.com/Hudell/mv-plugins
Check out my game :) www.fantasyfarming.com

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #10
Hm, so essentially institutionalized duck punching?  Not sure how I feel about that, seems... kind of crude, actually?

This is the first time I've encountered the term "snake case" for underscore-delimited names, but I like it.  It's funny, after my work on minisphere I found I actually ended up preferring that naming style over camelCase, but of course camelCase is more JS idiomatic, so what can you do there.

I like that debugging is a thing now, though we can proudly say Sphere had it first, thanks to me and minisphere. ;D  It's really a necessity for any serious game development, my hope is that some day someone uses minisphere to make the next Undertale.  That would be awesome.
  • Last Edit: November 13, 2015, 12:40:39 am by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #11
That's very interesting. I had heard it used SpiderMonkey.

Not that they would have ported it to anything except commodity hardware anyway.

I tend to prefer CamelCase because it reminds me of Mozilla code, whereas snake_case reminds me of Google. And I have found the quality of code from one of the two groups to be notably higher.

Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #12
When I downloaded it, it came with a builtin Chromium debugger, for playtesting the game. Once you "export" your game, it doesn't have any of the debug features, obviously.

The style to extend builtin methods reminded me of the script that Radnen, I think, made to improve efficiency of getPersonList(), where you replace a set of functions with wrapper functions to those functions. I actually threw together a plugin that modifies the default combat system with a more final fantasy-esque one, which is something I've been real excited to do once they shifted to javascript. I could have done it in ruby, but I didn't want to have to learn a whole language for that.

The editor doesn't actually have a way to edit js in it, and instead gives you a link to the folder where everything is kept. The editor really only gives you a decent GUI for the plethora of JSON files that make up the game's data, including the maps and their events. It also comes with an extremely decent character sprite maker, which you can use to throw together any number of characters. The biggest flaw of the sprite maker is that it doesn't have a huge number of options for each thing, but the community's already working on fixing that.

Being able to grep my way through the source code to find whatever I want to modify is still probably my favorite thing, and if I wanted to, I could totally edit the source code itself instead of using a plugin to encapsulate a group of changes. All it really needs now is decent documentation for all the source code, so I don't have to grep for words and names of things that sound like what I want to change :P

Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #13

Being able to grep my way through the source code to find whatever I want to modify is still probably my favorite thing, and if I wanted to, I could totally edit the source code itself instead of using a plugin to encapsulate a group of changes. All it really needs now is decent documentation for all the source code, so I don't have to grep for words and names of things that sound like what I want to change :P

I'm actually doing that for my own game, but I realize that this will give me a lot of extra work when the reworked base classes are released (we are working on updating the pixi version, but that requires a lot of work on the base classes of MV).
Check out my game :) www.fantasyfarming.com

  • Rukiri
  • [*]
Re: RPG Maker MV "They finally ditched Ruby for javascript!"
Reply #14
So... MV has been out for a while and I've written some code for it, so I can talk a bit about how it works:

Basically, they tried to implement ruby inside javascript.
Everything is added to the prototype;

Plugins are replacing existing methods to simulate Ruby's aliases:

Code: [Select]
  //Updates Game_Temp.prototype.setDestination to only be executed when the player has no destination set on itself
  var oldGameTemp_setDestination = Game_Temp.prototype.setDestination;
  Game_Temp.prototype.setDestination = function(x, y) {
    if ($gamePlayer._xDestination === undefined && $gamePlayer._destinationCharacter === undefined && $gamePlayer._yDestination === undefined) {
      oldGameTemp_setDestination.call(this, x, y);
    }
  };


They kept all classes and methods from Rpg Maker Vx Ace with basically the same name, just changing snake_case for camelCase.
The whole thing runs on a lot of open source projects: The rendering is managed by and old version of Pixi.js (the new version came out just a few weeks before MV). The windows and mac run on node.js. The mobile export is just a manual explaining how to use open source tools to turn your html5 game into an app.

Debugging is finally possible, thanks to node.js (or your browser's development tools if you use it).

The whole editor is completely unnecessary if you know how to write JS code, except for drawing maps (although you can use tiled map editor for that).
While stable 60fps is achievable, performance is still nowhere near Sphere level.

Every single line of code is now visible, so the community has already started writing deep changes to it.
I feel like this might be the last version of RM as we know it, because the community can do much more for it than the 2 programmers that made it.

Here's the link to my github, with some plugins written for it: https://github.com/Hudell/mv-plugins
Obviously bumping my own topic but thought I'd update what's happened with MV since the launch.
It's currently at 1.5x version they've also opened up an OSS project "Remember the XP standards project over a decade ago?" 
I would still say performance probably isn't as good as sphere, also it seems to be a pain in the arse to do an action-rpg in MV... I mean seriously, I could for the most part write Zelda ALTTP *base in 2 weeks or less, actually even less in Unity :)

The good thing is the RPG stuff is actually open and if you wanted could bring that over to Sphere (menu's/battle system).