Ancurio / mkxp

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

version with win32api #204

Closed ghost closed 3 years ago

ghost commented 5 years ago

I know the project is meant to be multiplatform but does it not compile a version like win32api? is a super required feature that we use on windows primarily to make systems online.

it would be possible?

dogtopus commented 5 years ago

It's always possible to use the Win32API stub made by @Ancurio to emulate certain APIs. In your case you could include the Ruby standard library and write a binding between the Ruby socket API and Win32API stub. Or you could go more intrusive by writing two different implementations for mkxp and stock RGSS engine. Automatically switching implementations is possible by detecting the presence of MKXP module.

Ancurio commented 5 years ago

@klebersonromero90 Even if I tried, Win32API is deprecated since Ruby 1.9 (and mkxp builds with much newer versions). Doesn't ruby have some Socket classes built in? Not sure why you would need win32api for online stuff.

ghost commented 5 years ago

I did not get to test but create an input keyboard without win32api is a bit tense

dogtopus commented 5 years ago

create an input keyboard without win32api is a bit tense Actually MKXP exposes keyboard inputs, so Win32API is still not required.

ghost commented 5 years ago

How to use sockets ?

Ancurio commented 5 years ago

@klebersonromero90 My bad, turns out the Socket is part of the standard library and not core Ruby, so it's not compiled into mkxp. Can't think of a solution at the moment that wouldn't require a custom build.

frozenLake commented 5 years ago

Shouldn't this be implemented anyway, so as to complete the mission statement of being able to run games created with the RPG Maker software natively without changing a single file?

dogtopus commented 5 years ago

@frozenLake Implementing Win32API is not practical because:

  1. It is basically equivalent to reinventing wine
  2. If the game only requires a few of the APIs to run (most common cases), then it is more practical to just implement these APIs using plugins. While plugins are not explicitly supported in mkxp, mkxp does support script preloading and loading libraries under ruby library path, which functions almost equivalently to a plugin system if used correctly.

So tl;dr why bother?

Ancurio commented 3 years ago

mkxp-z seems to have gotten a lot further than my own project in accommodating Win32API.