Sometimes, you need to play-test an MV game in a browser. However, trying to run the game through the index.html file will result in crashes. Using BrowserSync (a Node.js module), we can set up a local server in seconds and test it, without having to set up server software (unless you need to work on an ASP.NET or PHP website).
Requirements:
-Node.js
-BrowserSync
-An RPG Maker MV project.
Video version:
https://www.youtube.com/embed/lPamMNagfmY
Text Version:
Here’s how to start using it:
1. Download Node.js from
https://nodejs.org (or from your repository, if you are using a Linux distro). You can use either the LTS or the Current version.
2. After installing, run the node command line, then type “npm install -g browser-sync” (without the quotes. This will take a while.
3. Once installed, switch to the game’s folder in the command line (usually, cd <folder>).
4. Type “browser-sync start –server” (without the quotes). This will set up the server and open the game in the default browser.
If everything went right, you’ll see the “Connected to BrowserSync” badge and the game should work as it should.
If you need the game to refresh the browser every time you edit the game, you’ll need to tell BrowserSync to monitor the files.
To do that, type:
browser-sync start --server --files “<folder>/<file or filetype>”
Examples:
browser-sync start --server --files “data/*.json”
browser-sync start --server --files “*”
After that, just edit the game. The browser will refresh automatically.
本贴来自国际rpgmaker官方论坛作者:AceOfAces处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/playtest-an-mv-game-with-browsersync.91418/