I've been working hard on learning Javascript as a language for awhile and it occurred to me that I didn't know if MZ or MV used Javascript or just Java. Can anyone clarify for me? Or are they in part the same thing? I'm a coding noob. Thank you!
Does MZ use Javascript or Java?
RPG Maker MZ SupportThere is no real connection between Java and Javascript since Javascript's initial inception; MV and MZ both use Javascript, and not Java. 🙂
Javascript!
If I'm not mistaken, the reason Javascript is called Javascript is because at the time it was concocted, "Java" was growing in popularity so it was renamed from Livescript (and Mocha before that) to Javascript. That's really the only things Java and Javascript have in common beyond curly braces, dot notation, and semicolons.
I think java and javascript share some key words too. You can't name variables things like "if" etc. They also execute from the top and left to right. I could prolly think of more.
Well yeah, we could also argue they're both based on the english language. 🙂
Java and Javascript are both "C-styled" languages, alongside C#, C++, and a few others, but different from languages like Python, Ruby, Perl, Lisp, or BASIC. This means they have similar grammar, like when you need to use parenthesis, semicolons, and dots, curly braces around blocks of code, the use if "if () {}" instead of "if ___ then ___", a lot of the same reserved words, functions like += or ++, and more things than I can name. Each has their own quirks and unique features, so they're not interchangeable (especially javascript, which plays fast and loose with the rules whenever it can), but learning one will help a lot in learning the others.
Incidentally, RPGMaker VX and VX Ace were written in Ruby, not Javascript or any other C-style language, which is why it was a huge change for plugin developers, and took a lot longer for plugins to get remade, for the ones that did. And even within the same language, there can be different versions or "dialects," which change the features you have access to (which was the case between VX and VX Ace).
To my understanding, MZ still uses javascript, just a slightly newer version. The reason you can't just port MV plugins directly into MZ is because the plugin has to make specific changes to the original code to add things, and MZ's code is different from MV- the functions can have different names, or be called in different places.
This incompatibility is also a major limiter on how much they can add to any RPGMaker version via updates. There was a patch for MV- I believe around 1.6~1.7- that temporarily broke most item-related plugins because they improved the item scene handling, but in doing so changed the code structure, which meant all the plugins designed for the old code structure wouldn't run right.
Incidentally, RPGMaker VX and VX Ace were written in Ruby, not Javascript or any other C-style language, which is why it was a huge change for plugin developers, and took a lot longer for plugins to get remade, for the ones that did. And even within the same language, there can be different versions or "dialects," which change the features you have access to (which was the case between VX and VX Ace).
To my understanding, MZ still uses javascript, just a slightly newer version. The reason you can't just port MV plugins directly into MZ is because the plugin has to make specific changes to the original code to add things, and MZ's code is different from MV- the functions can have different names, or be called in different places.
This incompatibility is also a major limiter on how much they can add to any RPGMaker version via updates. There was a patch for MV- I believe around 1.6~1.7- that temporarily broke most item-related plugins because they improved the item scene handling, but in doing so changed the code structure, which meant all the plugins designed for the old code structure wouldn't run right.
Also note, Javascript is an interpreted language and does not need to be compiled like Java. Java is also a strongly typed language which means variables require a type at declaration (though it may support var now, in C# you can use generic declarations though they are a specific strong type).
There are plugins for RPG Maker XP that allow for C++ and Java, iirc there were scripts for MV that allowed for this, I hope they get ported to MV.
WebAssembly is supported as can be seen by the Effekseer implementation.
WebAssembly documentation: https://webassembly.org/
Node.js WebAssembly interface: https://nodejs.org/api/wasi.html
Node.js also supports C++ addons: https://nodejs.org/api/addons.html
Personally I would recommend sticking with JavaScript.
*hugs*
WebAssembly documentation: https://webassembly.org/
Node.js WebAssembly interface: https://nodejs.org/api/wasi.html
Node.js also supports C++ addons: https://nodejs.org/api/addons.html
Personally I would recommend sticking with JavaScript.
*hugs*
Original thread: https://forums.rpgmakerweb.com/threads/does-mz-use-javascript-or-java.126054/