Bringing MKXP down to Essentials' level

zozo

Rookie
Member
Joined
Aug 4, 2019
Posts
1
Alright, I don't know if I'm putting this in the right spot, but this looked like the closest match so here's hoping.

A few months ago, I was working to get Pokemon Uranium running in MKXP (Ruby 2.6, Win32API-less, all that stuff) to see if it would perform less... well, horrid, and while I was succeeding in doing that it's not the way I'm going this time. Instead I'm working on getting MKXP to adhere to Essentials games, rather than getting a single game to adhere to MKXP.

Is it silly? Probably. Is it a waste of my time? Dunno yet. Have I spent the last 11 or so days screwing up my sleep schedule doing it anyway? Of course. Does it work?

HqZEyrj.png
9hIvUbo.png



Why, yes. Yes it does. mostly. I'm at the point where you could drag and drop the executable and have it work, as long as the game doesn't use anything crazy like RGSS Linker (which I could but don't want to deal with, so I just skip over executing that script as well as its f-mod counterpart) or HMode7 (no), but using MKXP provides its own share of problems that will probably take time (or edits to scripts, which is probably easier) to solve, the most important of which being tileset sizes.

These games seem to have a habit of creating tilesets that are larger than OpenGL's limit for dimensions, which would probably normally be fine -- MKXP just sends it off to a mega surface and away you go. You can't do any operations on mega surfaces, though, which is exactly what `getRegularTile` tries to do, so as soon as you try to enter an area with a tileset too large (SLLD after the 'Welcome to the World of Pokemon' speech, Zeta after you leave the cave), the game will say 'no'. You could disable the check that prevents Sprite::setBitmap from throwing an error, this gets past that and you can indeed still play the game but that map will be full of glitched tiles. The only way around this besides changing TilemapXP would be just switching the graphics API, I think. Uranium is the only game I've tried so far where mega surfaces don't seem to be a problem.

Other than that, most of the problems are minor to minor-ish. Sockets still don't work but I can probably fix that by just using Ruby's, `load_data` is slower than in RMXP so it causes some noticeable performance hits when it gets used, Large and Fullscreen window sizes don't work (but you can use SDL's resizing and fullscreen just fine), volume control is busted but that might be something to do with the AudioContext stuff I haven't gotten to yet, some sprites don't show their #000000 pixels, things like that.

If anybody happens to have any interest in this, you can try building my fork of mkxp yourself. I want to provide static binaries, but every time I try to use `-static-libgcc` (which SDL2 also tries to pull in) I just get segfaults and I can't even debug it in IDA for whatever reason. I'm trying to get a Docker image or something set up and try building it from linux instead, but that's proving just as annoying in different ways. Run it and tell me about broken stuff, yell at me about how I'm coding like an absolute moron, send a pr or two, tell me why static libgcc crashes aaaaaaah god Windows why do you have to be this way, that'd be fantastic.
 

AenaonDogsky

Arbiter of Doggos
Member
Joined
Dec 12, 2017
Posts
503
Oh man I applaud you for the amount of effort you've put into this. Gotta check it out. The tileset limit you've mentioned must be around the 8000 height resolution I guess , right ? Also are we talking about Rgss3 performance level? I mean, mxkp is on 2.6.... O_o
 

Ruler

Dreamer
Member
Joined
Dec 4, 2018
Posts
6
This looks really cool! Out of curiosity, how would a developer go about including this in their project? Is this a system as simple as dragging the executable from the mkxp folder to the Essentials project folder, or would you need to manually bind the executable along with the contents of the folder to the project?
 
Top