Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting a VxAce game help! #70

Closed
VisMage opened this issue Sep 22, 2014 · 11 comments
Closed

Porting a VxAce game help! #70

VisMage opened this issue Sep 22, 2014 · 11 comments

Comments

@VisMage
Copy link

VisMage commented Sep 22, 2014

I'm trying to port a game I'm working on to Linux so that a friend of mine can play it, unfortunately I know nothing of coding, and don't have the slightest idea how to go about using mkxp. I've spent a good few hours searching for any form of tutorial on how to use it, but to no avail. Could someone please help give me a step by step instructions understandable by a newbie like myself, be it working from the files downloadable here, or working off those in TheMirrorLied, if that would be easier to do?

@Ancurio
Copy link
Owner

Ancurio commented Sep 22, 2014

His VisMage,

using the files from TheMirrorLied is a no starter, because that's an older version of mkxp without support for VX Ace.

Currently there aren't any prebuilt binaries for newer versions of mkxp, hopefully this will change soon. As for porting the game itself, this very much depends on how much Windows only functionality (Win32API) your custom scripts use. If you don't use any custom scripts, then there is usually no effort involved.

If you want, you can upload your game and send me a link, and I will take a look at it.

@VisMage
Copy link
Author

VisMage commented Sep 24, 2014

Thanks a bundle, I'd really appreciate it! Here is a link to my game files:
http://www.mediafire.com/download/r782b9se8ta6qwu/EoP.rar

Since I'm guessing you only really need access to the scripts, I took out a lot of the extra files such as music/pictures/most maps/ext in order to cut down the file size, while still leaving a working spawning map for testing if need be. If you do need those extra files, just let me know, and I'll upload the full game. Thanks again for doing this for me. :)

@Ancurio
Copy link
Owner

Ancurio commented Sep 27, 2014

Hey, so I took a look at your code and got it somewhat running. There's two problems I see:

  1. Your game appears to heavily rely on full keyboard input via Win32API, for which there is no equivalent functionality in mkxp at the moment.
  2. I see a custom mode7 renderer written in C/C++ in your game. I'm not sure if it's just dormant or if your game actually relies on it, but porting that in a cross platform manner is non trivial, especially if the script author didn't make the source code public.

I might be able to do something about 1, but 2 is a very different story.

@VisMage
Copy link
Author

VisMage commented Sep 27, 2014

Thank you for looking into this for me, I really appreciate it!

As far as mode7 goes, it was a feature I at one point planned, but never got around to using, and could be taken out at any time without issue.

I'm not sure if I can be of any help regarding the first issue, but be sure to let me know if there is anything I could help with, or if a particular script comes up that I'll simply have to work around.

@VisMage
Copy link
Author

VisMage commented Oct 9, 2014

I hate to sound like I'm rushing you, but has their been any luck?

@Ancurio
Copy link
Owner

Ancurio commented Oct 11, 2014

Sorry.

I haven't figured out how to do the full keyboard input yet, but I've had a go at making everything else work (there was one script that would continuously send me back into the title screen from the map). Right now I'm installing Ubuntu in a VM to get a good build of mkxp up that should run in most places. When I have that finished, I can bundle that up for you + the modified Scripts.rxdata, so you can create a Linux version of your game, although users won't be able to pause the game with P or use any of the debug bindings, like "1" for returning to the title screen.

I will still finish up the emulation of full keyboard support, so I can update you later when I have that finished. Ok?

@VisMage
Copy link
Author

VisMage commented Oct 11, 2014

That sounds great! I really appreciate everything you've done for me, thanks for everything!

I do have a quick question about the future though, my game still has a fair bit of development time ahead of itself, so I'll likely end up needing to update or add a few scripts over time. Assuming that these scripts don't deal with keypad input/win32API/other convoluted workings, would there be a simplistic way to insert them into the game given the modified scripts,rxdata?

@Ancurio
Copy link
Owner

Ancurio commented Oct 11, 2014

Here is a new Scripts.rvdata2 with a tiny syntax fix so ruby doesn't complain: http://ancurio.bplaced.net/mkxp/eop/Scripts.rvdata2

Here is the bundle of linux specific files: http://ancurio.bplaced.net/mkxp/eop/EoP_linux_skelet.zip

Basically, you will put your game folder contents into it, and that will be playable from linux (by running launch_linux.sh)

You can further add scripts and edit things, because I have pulled out the main script changes for linux into a separate script (preload/win32_wrap.rb), so I can later give you an updated version of that file and won't have to touch Scripts.rvdata2 anymore (hopefully). And yeah, if it's purely RGSS/ruby with no Win32 interfacing, further added scripts should work just fine.

Remember that your game relies on the VX Ace RTP, so you will have to bundle it with your game to make this work.

@VisMage
Copy link
Author

VisMage commented Oct 17, 2014

Thank's a bunch for everything!

Sorry I didn't get back to you earlier, but it took longer than expected to get the game to my friend to test, where we ran into a bit of a snag. At the expense of sounding like a complete noob, I have to ask the question, how do we run the launch_linux.sh file? He tried to launch it as an aplication, but it wouldn't let him. As silly as this sounds, could you teach me the steps of how to launch the file? Again, sorry about the silly request, although we have become stumped on how to go about this.

@Ancurio
Copy link
Owner

Ancurio commented Oct 17, 2014

Don't worry about sounding like a noob, if you are not a Linux user there's obviously no way for you to be familiar with it ^^. If you unzipped the contents on a Windows system (eg. to add your own files), it's possible that the executable bit got lost. I'm gonna assume your friend uses a common distribution like Ubuntu:

Right click launch_linux.sh, select "Properties", then select the "Permissions" tab and check the "Allow executing file as program" checkbox, then close the dialog. Also repeat this process for the files mkxp.x86 and mkxp.amd64. This should allow him to double click launch_linux.sh to launch it.

The file properties dialog would look similar to this: GUI example

@Ancurio
Copy link
Owner

Ancurio commented Oct 22, 2014

I have committed the required changes for full keyboard support. Here is a zip with all the changed files, just unpack it inside the original directory and overwrite all existing files:

http://ancurio.bplaced.net/mkxp/eop/EoP_keyboard_patch.zip

@Ancurio Ancurio closed this as completed Nov 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants