RPGMakerMV & Node.JS

Introduction

Following up from my post on the differences between embedded vs Web-based MV. I have mentioned Node.js. As the beginning of a longer series, let’s talk about Node.js

The Node.js, What is it?

Node.js is a powerful tool that lets developers run JavaScript on the server-side (on a computer). It works by interpreting your JavaScript code and spitting it out in a way that a computer can execute. RPGMakerMV when running on the computer uses this to run your game (NW.js uses Node.js to run JavaScript on the computer). It’s built on top of Chrome’s V8 engine, so if you’ve ever used Google Chrome, you’ll notice there are some similarities.  Now, many higher level languages (Java, C#, etc) had something similar but before Node.js came along it was difficult to do with JavaScript. We could go into more detail, but let’s discuss how it can help you.

The Node.js Awesomeness

Besides Node.js letting you run JavaScript on your computer, it also has an API; An API in RMMV language would be a plugin that provides you with script calls to use. For others, an API is an interface with other people’s code that you can access and use for your own purposes when coding. Some examples of the functionality it provides are reading files, creating folders, running scripts in the background, changing file permissions and more. Not only that, but it lets you use npm; npm is a package manager that lets you use other people’s JavaScript code to add even more functionality on top of Node.js.

As developers, it may not seem too apparent how this could help us, but if we wanted to run code in the background for our game, this could be immensely helpful. For example,  compressing image files while the game is running to keep load times short when showing images on the screen. Or, making live edits to a text file while the game is running to give NPCs more interesting things to say. Creating events within our plugin that we can call with script calls. Getting information from a website and using that information in our game. These are just examples, not even considering what you could do with npm. Now, this is just an overview, the next post will cover making our first plugin in RPGMakerMV with Node.js.

Now, this is just an overview, the next post will cover making our first plugin in RPGMakerMV with Node.js. If you want to learn more about Node.js and the insides of RPGMakerMV stay tuned in and happy game-making!

 

Get Node.js: Node.js Website

Leave a Reply

Your email address will not be published.