RPGMaker MV ES6 Feature List

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
556
Reaction score
794
First Language
English
Primarily Uses
RMMV
Introduction


Hello, everyone! It’s time to discuss ES6, or JavaScript in RPGMaker MV(RMMV). Most code in RPGMaker MV is written in ES5. RPGMaker MV is an engine running on NW.js (or Node-webkit); the version is older (nw.js is 0.12.3), however this still allows developers to use some ES6 syntax inside of their code alongside ES5 code.


To start of, I’ve decided to gather most of the features that work in RMMV. Here’s a list of ES6 features available in RMMV.


Features


  • Block Scoped Variables

  • Objects



    Object Assignment

  • Shorthand Object Properties

  • Method Properties

[*]
Template Literals



  • Expression Interpolation

  • Multiline Strings

[*]
Classes



  • Class Inheritance

  • Base Class Access

  • Getters and setters

[*]
Symbols

[*]
String Methods



  • Repeat

  • Starts With

  • Includes

  • IndexOf

[*]
Numbers



  • Type Checking

  • Safety Checking

  • Number Comparison

  • Truncation

  • Sign Determination

[*]
Sets and weak sets

[*]
Maps and weak maps




Each of these features can enhance your code in some way as you’re developing your plugins. Furthermore, you can use them in tandem with regular ES5 code; that’s the most important point to make.


In future posts, I’ll go over each feature in depth, and give you a general idea of how each one can improve your code in some way, as I’ve started using ES6 in my JavaScript.


Finally, if you enjoyed this small tidbit of information, or you think you’d like to know more, please comment down below and stay tuned!
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
556
Reaction score
794
First Language
English
Primarily Uses
RMMV
Thanks! I'm actually working on a plugin using ES6 and ES5 together @Jonforum
 

LTN Games

Indie Studio
Veteran
Joined
Jun 25, 2015
Messages
704
Reaction score
631
First Language
English
Primarily Uses
RMMV
Right now, as awesome as it is to use ES6, it's a lot slower than ES5, especially if you don't transpile it with babel or traceur and even then it all depends on the platform it will be run on. That being said, there are still a lot of ES6 features not compatible with all platforms, for example, const, and let are not supported in all android versions and only ios10 support it. So, if plugin developers decide to use ES6 and you want your plugins to be compatible with all platforms it would be wise to transpile it before releasing it into the public. Babel is one of the easiest ways to do this and it seems to be the more popular one at the moment. 


For a full ist of the compatibility for ES6 check out this great chart https://kangax.github.io/compat-table/es6/, as you can see it's mostly modern OS's and modern browsers that can handle most ES6 features. So if you want your plugins to work for a variety of OS's and browsers then you should transpile your plugins to ensure full compatibility.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top