Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
509 stars 128 forks source link

High-level RPG Maker MV emulation support aka "mkmv" #224

Closed dogtopus closed 3 years ago

dogtopus commented 4 years ago

Okay it might sound crazy but there are some actual benefits of doing so:

As for the actual feasibility, it looks kinda doable at least for the stock set of scripts (not sure how the community write their own script though, it could go full Win32API but with HTML5). Also since mkxp's core has no direct dependency to ruby whatsoever it makes integrating a JavaScript engine (e.g. DukTape or v8) a lot easier.

If somebody is interested in doing this (including me :D) then just go ahead and try it. This is not a feature request whatsoever because I know it still sounds crazy and might be not worth the effort.

Cloudef commented 4 years ago

This is not really feasible since plugins in rpg maker mv basically have full access to browser or node apis (including nw.js apis) + pixi.js. Best you can do is build something on top of nw.js / node / browser and replace the core parts with better code. But you'd still have problems with compatibility, especially since games can pretty much ship their own runtime and plugins can hotpatch anything.

dogtopus commented 4 years ago

Yes I'm aware of that. The question is how many plugin/game authors really bother to tap into the low-level parts like PIXI.js or even use DOM/WebGL/etc. directly and how they would make their code coexist with the RPG Maker stuff. On every Windows RPG Maker similar things are already possible via Win32API or hooks but they can often be worked around in a case-by-case basis. In case of "using their own runtime", this is definitely out of the scope since they are not even using RPG Maker anymore or just using a small subset of the features (like as a map editor).

Cloudef commented 4 years ago

You could start by making shim of pixi.js that actually calls C code, but run anything else in javascript or even inside node.js (for more compatibility), implementing the nw.js bits is gonna be more work to be honest, because that thing is a full blown chromium. Honestly it sounds very fruitless work, and best approach would be to start with the same stack they are using and replacing bottlenecks by native shims.

Ancurio commented 3 years ago

Closing this as it's not directly related to mkxp. What you describe sounds like a cool idea, feel free to contact me on twitter or discord if you get a project in that direction going (not saying I'll contribute, but I'd be interested in progress).

dogtopus commented 3 years ago

@Cloudef I think you kinda missed the point. What I have in mind is more of emulating the RPG Maker layer of things (all rpg_core stuff and possibly all rpg_managers stuff as well) rather than porting the whole layer and above to a different engine. Using older RPG maker analogy it would be like porting all the scripts to a new runtime with Audio/Graphics/etc. implemented outside rather than running the whole RGSS*.dll on a different platform. I have to clarify that this doesn't make the process magically easier though since all the object lookup process will be really fragile. One could easily minify the whole package and I will have nothing to hook into and the only remaining option would be browser emulation (i.e. the thing that I definitely won't touch). I imagine that if this is real it will be even more of a developer's toy than mkxp since it will be a lot easier to integrate it into the game in development phase but (extremely?) difficult to use it to run published games on unintended platforms.

@Ancurio Although it will be unlikely from me. Noted.