User registration for cloud based version

mfexplorer

Villager
Member
Joined
Aug 9, 2022
Messages
29
Reaction score
6
First Language
English
Primarily Uses
RMMZ
Sorry if I posted something about this before, but I don't have an answer yet. It seems some people had this for MV but then it got abandoned.

I'm after a way to have my cloud based Rpg Maker MZ game require a username and login and then when Save Game happens, it is saved in a space for that particular user?

Has anyone done this or can anyone guide me?

I'm willing to pay to get this feature.

Thanks in advance for any help.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
753
Reaction score
719
First Language
german
Primarily Uses
RMMZ
If there was an easy solution, I would be jobless.

If there are still projects for MV, it should be simple for them to upgrade for MZ as both engines are similar. But it's in their hand if they want to make the effort, of course.

First of all, you need a Backend and a Database. I think MongoDB should fit quite well here to store RPG Maker savegames. For the backend, it could be any language, probably NodeJS or maybe Python flask. Both are really easy to understand and are made for building a simple web server.

You need something to host your backend. I never dealt with that, so I can only give you some tips from what I heard. Googling for "backend as a service" might be a good start to finding something to start programming on. I heard that "Netlify" is popular but I never with that.

In the end: Why do you want to do that feature? RPG Maker automatically uses the local storage to save games which works really well. The only thing is when a user switches his device (maybe from mobile to PC?), but I don't know if this is worth the effort.
 

mfexplorer

Villager
Member
Joined
Aug 9, 2022
Messages
29
Reaction score
6
First Language
English
Primarily Uses
RMMZ
If different people are saving games played at the same web URL then I supposes they could write over eachother's games.

I have a Windows VPS.

MongoDB is very flexible at storing objects so yes.

Everything is easy once you know how. It just takes time to learn and I have to learn everything related to this project and more.

Can someone tell me what objects are needed to save the game state? Or where the code is that does this in the core?
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
753
Reaction score
719
First Language
german
Primarily Uses
RMMZ
DataManager.saveGame and DataManager.loadGame should be a good point to start.
 

NeTT

Schatten Et Caligo
Member
Joined
Sep 29, 2018
Messages
13
Reaction score
26
First Language
Tamil
Primarily Uses
RMMV
A veeery simple approach:
  1. Create a web server with REST endpoints (register, login, save game, load game). If you want one within JavaScript, check out Oak (with Deno) or Express (with Node, tho I don't personally recommend express).
  2. When save game is hit, send a request to your REST API with the save data. You could go for a mongo/couchbase type approach or just go minimal with SQLite or PostgreSQL (cost-efficient if you have a VPS ready).
  3. When load game is hit, send a request to your REST API, which checks whether the user is logged in and sends stuff back.

You'll only need some minimal knowledge of HTTP and JavaScript for this.

I suppose I'll try to write a tutorial on it if I find time.
 
Last edited:

mfexplorer

Villager
Member
Joined
Aug 9, 2022
Messages
29
Reaction score
6
First Language
English
Primarily Uses
RMMZ
DataManager.saveGame and DataManager.loadGame should be a good point to start.
Looking at the code in rmmz_manager.js, it seems like

DataManager.makeSavename = function(savefileId) {
return "file%1".format(savefileId);
};

is what should be modified, either that or the part which forms the directory, probably by prefixing some kind of username before file, and similarly with loading files.

But for me, I can't really go back into learning how to code properly - life is too short to do all the things I would enjoy or even need to do.
 

Latest Threads

Latest Profile Posts

DamageEvil_1.png added!
index.php

I have a very strong feeling my internet will be hurricane'd, forcing me to work exclusively on my projects. Wish me luck y'all.
Figured I should probably put my badly written RMMV plugins on GitHub or something, idk.
I've been working on plugins to make it easier to incorporate Persona 3's Once More batsys into MV games. One makes it so you can have states automatically applied to the target and/or user when their hit crits or targets a weakness... I could use testers for it, though. Maybe I'll make a thread in the JS Plugins In Development board about it?
Whenever I'm feeling down I like to watch Bardic Inspiration by Deerstalker Pictures
on youtube. Because 'my mockery is Vicious.' It's funny and catchy like the flu.

Forum statistics

Threads
125,618
Messages
1,172,300
Members
164,726
Latest member
strangefangs
Top