Tutorial Easy way to play RPGM games on Ubuntu (linux)

Thundas

Member
Donor
Jul 16, 2017
302
782
As many of you find out, rpgm games dont work with WINE, i found an easy way to run rpgm games, all you need is a browser & python.

On the command line, navigate to the game’s www folder. then write this on the command line window.

Code:
python3 -m http.server --bind 127.0.0.1 8000
then open your favorite web browser and navigate to to run the rpgm game directly on your browser.

Do not close the command line window. Once you are done playing, simply use ctrl + c on the command line window to end the local server instance.

Edit - I saw someone already posted this on a 2020 thread in a post, the saves are stored on your browser cache so for every new game you have to assign a different port. Example below for another game.

Code:
python3 -m http.server --bind 127.0.0.1 8001
I hope this helps, it is a miracle for me since i switched over from windows 10 and not being able to play any rpgm games, unity & renpy works with wine but not rpgm.

Edit - This should work on most variations of linux as long as python3 is available and installed on your system.
 
Last edited:
Jul 3, 2021
120
185
Which version of RPGM? In MV, I'm pretty sure you can just navigate to "www" folder in the game's base directory and double click "index.html." You might have to set privacy.file_unique_origin to false in your web browser for it to work properly. Or are there different was of exporting the game in MV?
 

Thundas

Member
Donor
Jul 16, 2017
302
782
Which version of RPGM? In MV, I'm pretty sure you can just navigate to "www" folder in the game's base directory and double click "index.html." You might have to set privacy.file_unique_origin to false in your web browser for it to work properly. Or are there different was of exporting the game in MV?
This should work for pretty much all rpgm versions that has the wvw folder, problem with doing what you suggested is that most modern browsers have some sort of network location security built in even with disabling what you suggested and most rpgm games will have trouble locating assets which results in missing images or files. The method i suggested should be the easiest way to play rpgm games aside from using nodejs for MV versions.
 

F4C430

Active Member
Dec 4, 2018
650
745
  1. You can try specifying the encoding for Wine to force it to use UTF-8: LANG="ja_JP.UTF8" wine Game.exe or JIS: LANG="ja_JP.EUC-JP" wine Game.exe. I can't remember if this worked for a game that didn't work otherwise. At the very least, this may help you figure out what the error is because you should see Japanese text instead of empty Unicode boxes.
  2. It's redundant to bind to 127.0.0.1. Just do path/to/game/folder/www$ python3 -m http.server 8000 Then you can open your internet browser and go to localhost:8000 or 127.0.0.1:8000 (they are equivalent) to play the game. Just be aware that what you are doing is running a minimalistic web server on your computer. This shouldn't be accessible from the internet unless you set your router to do so, but it is accessible from other computers on your local network.
These "solutions" are not guaranteed to work and i'm not enough of a Linux nerd, or know enough about RPG Maker to figure out why.
 

F4C430

Active Member
Dec 4, 2018
650
745
This tutorial is pretty useless for RPG Maker MV/MZ games since RPG Maker is based on node.js modules, which use Chromium and therefore runs natively on every platform with a modern web browser.

For more information check:

Or this Linux tutorial page: https://f95zone.to/threads/playing-on-linux-tutorials-tools-and-help.19523/post-1201295
I want to expand on this because the explanation in that thread doesn't really explain the problem and isn't very thorough in describing its solution. I had to spend some time to understand it so i thought this might help save someone else any confusion.

Applies To:
RPG Maker MV and RPG Maker MZ only.

Background:
These games use NW.js to run the game. In short, it's running the game in a browser. That's why you can run it in your web browser by opening /www/index.html from the game's directory (see note below). Running Game.exe or Game from the game's directory is basically starting a special stand-alone Chrome-based browser to run the game (this is not your Chrome browser you browse the internet with).

Cause of the Problem:
The RPG Maker MV and RPG Maker MZ development tools do not come with the most recent updated version of NW.js which leads to problems on updated Linux systems. The easy telltale sign of this is you will get a NW.js profile error message when trying to run the game and/or the game window will just be all black.

Detailed Solution:
  1. Download the latest Linux 64-bit (assuming you're on a 64-bit OS) NORMAL version of NW.js from . This will download a compressed tar.gz archive.
  2. For every single game that you need to fix, extract the NW.js archive you just downloaded to wherever is convenient for you. Personally, i extract it as a new folder inside the game's directory. This is going to serve as your new game directory which is why you need to do it for every game with the problem.
  3. Move/copy or symlink the needed files:
    • If you choose to copy (doubles the disk space used by the game), copy nw.pak, package.json, and the entire www/ directory into the new NW.js directory you created. Alternatively, you could move them instead of copying. Personally i don't like messing with the original files in case i forget what i did later on.
    • If you choose to instead (saves disk space and keeps the original files where they are), create symlinks to nw.pak, package.json, and the www/ directory from within the new NW.js directory you created. The symlinks should have the same name as the file/directory you are linking to. To reiterate, these symlinks should be created inside the new NW.js directory and point to the same file/directory in the original game directory.
  4. Rename the nw file inside the new NW.js directory to Game unless you won't forget that nw is the executable. I rename it because i tend to forget after a while.
  5. Run the game with the Game executable you just renamed inside the newly created NW.js directory.
  6. If you still encounter problems, please ask for help in this thread.

Resulting Structure:
(Assuming you extracted the NW.js archive to inside the game's original directory)
Code:
Original game directory/
├ locales/
├ nwjs-v0.58.0-linux-x64/
    ├ lib/
    ├ locales/
    ├ swiftshader/
    ├ www/ (copied or symlink to "../www")
    ├ Game (or nw if you didn't rename it)
    ├ nw.pak (copied or symlink to "../nw.pak")
    ├ package.json (copied or symlink to "../package.json")
    └ (other files that came in the NW.js archive)
├ swiftshader/
├ www/
└ (original game files including nw.pak and package.json)
Notes:
  • Not every game comes with a nw.pak in which case don't worry about it.
  • You can just run the game in your own browser by opening /www/index.html, but be mindful that your saved games will be in the browser's cache and there's a risk of losing your save files.
  • If you're a game dev, please for the RPG Maker MV/MZ development software. Even if you are only distributing for Windows, please follow those same instructions but replacing the NW.js files for Windows (RPGMV\nwjs-win, RPGMV\nwjs-win-test) using the Windows 64-bit SDK download instead.

Please let me know if any information here is incorrect.
 
Last edited:
  • Like
Reactions: anon98989

Deleted member 609064

Well-Known Member
May 11, 2018
1,249
1,590
As many of you find out, rpgm games dont work with WINE, i found an easy way to run rpgm games, all you need is a browser & python.

On the command line, navigate to the game’s www folder. then write this on the command line window.

Code:
python3 -m http.server --bind 127.0.0.1 8000
then open your favorite web browser and navigate to to run the rpgm game directly on your browser.

Do not close the command line window. Once you are done playing, simply use ctrl + c on the command line window to end the local server instance.

Edit - I saw someone already posted this on a 2020 thread in a post, the saves are stored on your browser cache so for every new game you have to assign a different port. Example below for another game.

Code:
python3 -m http.server --bind 127.0.0.1 8001
I hope this helps, it is a miracle for me since i switched over from windows 10 and not being able to play any rpgm games, unity & renpy works with wine but not rpgm.

Edit - This should work on most variations of linux as long as python3 is available and installed on your system.
Thank you, this is a great help.
 

ohcmonrest

Member
Jul 22, 2017
412
329
I want to expand on this because the explanation in that thread doesn't really explain the problem and isn't very thorough in describing its solution. I had to spend some time to understand it so i thought this might help save someone else any confusion.

Applies To:
RPG Maker MV and RPG Maker MZ only.

Background:
These games use NW.js to run the game. In short, it's running the game in a browser. That's why you can run it in your web browser by opening /www/index.html from the game's directory (see note below). Running Game.exe or Game from the game's directory is basically starting a special stand-alone Chrome-based browser to run the game (this is not your Chrome browser you browse the internet with).

Cause of the Problem:
The RPG Maker MV and RPG Maker MZ development tools do not come with the most recent updated version of NW.js which leads to problems on updated Linux systems. The easy telltale sign of this is you will get a NW.js profile error message when trying to run the game and/or the game window will just be all black.

Detailed Solution:
  1. Download the latest Linux 64-bit (assuming you're on a 64-bit OS) NORMAL version of NW.js from . This will download a compressed tar.gz archive.
  2. For every single game that you need to fix, extract the NW.js archive you just downloaded to wherever is convenient for you. Personally, i extract it as a new folder inside the game's directory. This is going to serve as your new game directory which is why you need to do it for every game with the problem.
  3. Move/copy or symlink the needed files:
    • If you choose to copy (doubles the disk space used by the game), copy nw.pak, package.json, and the entire www/ directory into the new NW.js directory you created. Alternatively, you could move them instead of copying. Personally i don't like messing with the original files in case i forget what i did later on.
    • If you choose to instead (saves disk space and keeps the original files where they are), create symlinks to nw.pak, package.json, and the www/ directory from within the new NW.js directory you created. The symlinks should have the same name as the file/directory you are linking to. To reiterate, these symlinks should be created inside the new NW.js directory and point to the same file/directory in the original game directory.
  4. Rename the nw file inside the new NW.js directory to Game unless you won't forget that nw is the executable. I rename it because i tend to forget after a while.
  5. Run the game with the Game executable you just renamed inside the newly created NW.js directory.
  6. If you still encounter problems, please ask for help in this thread.

Resulting Structure:
(Assuming you extracted the NW.js archive to inside the game's original directory)
Code:
Original game directory/
├ locales/
├ nwjs-v0.58.0-linux-x64/
    ├ lib/
    ├ locales/
    ├ swiftshader/
    ├ www/ (copied or symlink to "../www")
    ├ Game (or nw if you didn't rename it)
    ├ nw.pak (copied or symlink to "../nw.pak")
    ├ package.json (copied or symlink to "../package.json")
    └ (other files that came in the NW.js archive)
├ swiftshader/
├ www/
└ (original game files including nw.pak and package.json)
Notes:
  • Not every game comes with a nw.pak in which case don't worry about it.
  • You can just run the game in your own browser by opening /www/index.html, but be mindful that your saved games will be in the browser's cache and there's a risk of losing your save files.
  • If you're a game dev, please for the RPG Maker MV/MZ development software. Even if you are only distributing for Windows, please follow those same instructions but replacing the NW.js files for Windows (RPGMV\nwjs-win, RPGMV\nwjs-win-test) using the Windows 64-bit SDK download instead.

Please let me know if any information here is incorrect.
Most games I've encountered that use RPGM MZ don't have a www directory, though. The modded PLUS version of nano control is one example. The file structure is all different, with things that are normally in the www directory in the main dir instead, but not all of them. I've tried meticulously going through every dir and copy and replacing the relevant files but nothing works.
 

y.king

Newbie
Jul 17, 2022
40
53
I like this simple solution, nice!
For convenience I tend to put a shell script like this in a file in the game directory:

Code:
#!/bin/bash                                                                     
python3 -m http.server --bind 127.0.0.1 8000 &
brave-browser http://127.0.0.1:8000/www/index.html
(If you aren't using the brave browser, you'll need to substitute brave-browser with what works for your browser.)

I usually give the file a name that means something to me (e.g. Paradise.sh) and make sure that it is executable, by opening a shell in the folder with the file and typing something like:
Code:
chmod +x Paradise.sh
 
Last edited:
  • Like
Reactions: Thundas