Huge issues with charset lag

Does the problem happen under windows, for the windows build?
It's just regular test playing from within the toolkit in every case. I can try an exported build when I make the new debug project while I'm at it, just to rule out test playing being the issue somehow, or at the very least narrow down the problem to that if possible.
No need to deploy. I just couldn't recall if there was an OSX version of RMMV.

For kicks and giggles, with the game resolution still set to 480x324 in MV...On your Mac, can you go to System Preferences > Display, check "Scaled" and pick a resolution without "HiDPI"? Then, let me know if you still see the event tearing.
The question though is, how can you make sure the end user will have that kind of settings, so the game will work well? That would be a pain.
@Jaiden : I believe Steam has a MAC version of MV. It's the stand-alone that doesn't have it.

Was at work but looks like I missed a lot. But the thing is MAC's and PC's handle displays differently which could be why there is an issue in reproduction. Also if you do a PC test, let us know if it is an AMD vs Intel Processor too.

As for all the .js stuff, I hope you did update your project to at least 1.3 or so, as I saw you started when MV came out, which means you could be trying to run plug-ins meant for 1.6 on an 1.0 project. Can you check your project core file version too? To do that open one of the .js files in core and see what version it says? If nothing is there you are on 1.0.

If you already did that step, please restate it at least, for ease of reference.
Does the problem happen under windows, for the windows build?
Sure I can check that as well, but the more stuff I add to my troubleshooting the more time it'll take to get back with an update, so I'll have to take some time with these additional points.

No need to deploy. I just couldn't recall if there was an OSX version of RMMV.

For kicks and giggles, with the game resolution still set to 480x324 in MV...On your Mac, can you go to System Preferences > Display, check "Scaled" and pick a resolution without "HiDPI"? Then, let me know if you still see the event tearing.

Unfortunately macOS doesn't allow HiDPI toggling anymore these days. You have to select integer-scaled resolutions. I tried using the highest possible resolution, but it didn't change anything:

Screen Shot 2019-04-05 at 20.44.22.png

Apple have been introducing some changes which seem to indicate that they're dropping support for non-HiDPI resolutions, so it makes sense that I wouldn't be able to control the resolution without hacking the system.

@Jaiden : I believe Steam has a MAC version of MV. It's the stand-alone that doesn't have it.

Was at work but looks like I missed a lot. But the thing is MAC's and PC's handle displays differently which could be why there is an issue in reproduction. Also if you do a PC test, let us know if it is an AMD vs Intel Processor too.

As for all the .js stuff, I hope you did update your project to at least 1.3 or so, as I saw you started when MV came out, which means you could be trying to run plug-ins meant for 1.6 on an 1.0 project. Can you check your project core file version too? To do that open one of the .js files in core and see what version it says? If nothing is there you are on 1.0.

If you already did that step, please restate it at least, for ease of reference.

Sure I can try and double-check all of these things as well, but as I stated before, my list of things to try is quite long now, so it's going to take a long while until I can respond with an update.
I suggest that so we can check if this issue happens on Mac only or it is global.
Currently installing MV on my Mac to have a look. Based on the last screenshot, it still looks like the window is still being scaled by OSX, which is another suspicion of mine.

@quackgyver you can try this fix in the meantime, create a plugin, put it at the top, and place this line of code in it:
Code:
PIXI.tilemap.TileRenderer.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;

This turns off linear interpolation, which is something suggested by @bblizzard

EDIT:
Wasn't able to replicate it on my Mac. Same idea. Resolution height of 320 causes the bug, but 324 is fine. This leads me to the forced window scaling of his Retina display, but I'm not entirely sure of a solution for that.

@quackgyver I'm taking a shot in the dark here, but what happens when you set the resolution to 300 x 210?
As I said before, trying all the troubleshooting steps and providing all the data that's been requested of me in the last few posts is going to take a lot of time, so I'm not ignoring anyone or anything, but since trust seems to be an issue in this thread, here's a video proving without a doubt that I'm not lying, missing or misrepresenting anything, and that I'm most definitely able to reproduce the problem with a resolution that is divisible by 48:



I really hope that this is enough to put any doubts to rest now, and that we can henceforth assume that I'm following the steps that I claim to have done.

@quackgyver you can try this fix in the meantime, create a plugin, put it at the top, and place this line of code in it:
Code:
PIXI.tilemap.TileRenderer.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;

I tried doing this and unfortunately it didn't work.

Screen Shot 2019-04-05 at 21.29.48.png

EDIT:
Wasn't able to replicate it on my Mac. Same idea. Resolution height of 320 causes the bug, but 324 is fine. This leads me to the forced window scaling of his Retina display, but I'm not entirely sure of a solution for that.

@quackgyver I'm taking a shot in the dark here, but what happens when you set the resolution to 300 x 210?
I tried that as well, and unfortunately it didn't work either.

I'll post more updates as I'm able to go through the aforementioned troubleshooting steps.
I appreciate your patience, and apologize if I came off as terse earlier. The video is great, thanks for posting that.

Unfortunately, I'm at a loss at this point, and honestly MV isn't really my specialty. We did narrow it down to being an issue on MacOS, and ruled out a lot of other causes. I still have a gut feeling it's related to resolution (I think MacOS is scaling it), but at that point it's not really in your control, either.

I think we'll just have to wait until you can try the other fixes (such as Archeia's) and someone else with more in-depth knowledge will have to weigh in. Good luck.
I appreciate your patience, and apologize if I came off as terse earlier. The video is great, thanks for posting that.
Thanks for the apology. I really appreciate it.

Unfortunately, I'm at a loss at this point, and honestly MV isn't really my specialty. We did narrow it down to being an issue on MacOS, and ruled out a lot of other causes. I still have a gut feeling it's related to resolution (I think MacOS is scaling it), but at that point it's not really in your control, either.

I think we'll just have to wait until you can try the other fixes (such as Archeia's) and someone else with more in-depth knowledge will have to weigh in. Good luck.
I wouldn't rule out Windows entirely yet, but trying it on Windows is part of the troubleshooting that I'm gonna do next, so we'll see when the results are in. If we're lucky then one of these steps will help, but ultimately I do think that it's an issue with how RM is programmed, which is something that the devs will have to fix.

But again, I'll go through the troubleshooting as requested by everyone, and we'll see.
*a wild Blizzard appears*

With 10+ years of experience game development on with Windows, Mac, iOS, Android, WinRT and Windows Phone I can tell you that it's Mac OSX that's handling rendering through OpenGL wrong. While this issue CAN happen on other platforms, Mac and iOS seem to have this issue basically right away and very visibly as soon as rendering isn't pixel-perfect.

The issue is caused by the interpolation of pixels from the texture that's being rendered. The only real solution for this is to have a row of pixels repeating on every of the 4 edges of the image within the texture so that interpolation uses neighboring pixels that are the same as the last "visible" pixel. That being said, it usually manifests as a ghostly line, often barely visible. Except on Mac OSX. It seems that the Mac OSX developers just decided that they will cut it off completely and you are left with the result that you are experiencing. Even iOS handles it better (but not much).

So it's not an issue with RPG Maker and it cannot really be fixed. Your best solution is not to use a Mac for development mostly because most of your audience will be running your game on a Windows PC and you should definitely use the target platform as development platform. If you plan on going mobile, I suggest that you extensively test the game on the chosen mobile platforms as well, because you are going to run into platform-specific quirks there as well.

*runs away*
*a wild Blizzard appears*

With 10+ years of experience game development on with Windows, Mac, iOS, Android, WinRT and Windows Phone I can tell you that it's Mac OSX that's handling rendering through OpenGL wrong. While this issue CAN happen on other platforms, Mac and iOS seem to have this issue basically right away and very visibly as soon as rendering isn't pixel-perfect.

The issue is caused by the interpolation of pixels from the texture that's being rendered. The only real solution for this is to have a row of pixels repeating on every of the 4 edges of the image within the texture so that interpolation uses neighboring pixels that are the same as the last "visible" pixel. That being said, it usually manifests as a ghostly line, often barely visible. Except on Mac OSX. It seems that the Mac OSX developers just decided that they will cut it off completely and you are left with the result that you are experiencing. Even iOS handles it better (but not much).

So it's not an issue with RPG Maker and it cannot really be fixed. Your best solution is not to use a Mac for development mostly because most of your audience will be running your game on a Windows PC and you should definitely use the target platform as development platform. If you plan on going mobile, I suggest that you extensively test the game on the chosen mobile platforms as well, because you are going to run into platform-specific quirks there as well.

*runs away*

The issue does occur in Windows though:

Screen Shot 2019-04-05 at 22.18.07.png


So it does indeed seem to be an RPG Maker MV-specific problem.
Did you... Did you just ignore my explanation of why this happens? I clearly stated it can happen on all platforms. What screen are you using at what DPI, what resolution and what resolution are you running MV at?
Did you... Did you just ignore my explanation of why this happens? I clearly stated it can happen on all platforms.

You also stated that this is "Mac OSX that's handling rendering through OpenGL wrong" and said that macOS and iOS "have this issue basically right away" despite the fact that I'm reproducing the error on both macOS and Windows with the exact same approach and consistency in results. I even tested it on an additional Windows machine just now for good measure, and there's no difference from how it appears on macOS. Therefore, I don't understand why you're claiming with such certainty that it's a macOS-centric issue when it's happening across platforms in the exact same manner.

Also, other HTML5 engines handle aspect ratios, pixel rounding, tile and sprite rendering, delta time, resolutions, zooming and complex screen manipulation just fine across every single major platform and browser, so I don't see why RPG Maker MV shouldn't be able to as well.

What screen are you using at what DPI, what resolution and what resolution are you running MV at?

So far I've tested it on a 2560x1600px Mac with an Intel UHD Graphics 617 at simulated resolutions of 1024x640, 1280x800 (DPI scaling x2), 1440x900 and 1680x1050, virtualized Windows 10 also on Intel UHD Graphics 617 at 2560x1600px (no DPI scaling) and Windows 10 on an Nvidia GTX 1060 at 4096x2160px (no DPI scaling). Windowed and fullscreen. Same result.
If you're upscaling the base resolution by that much, of course it will happen all the time.

I said it happens on all platforms. Why are you so defensive of Mac? I should have been more clear that it happens consistently on upscaling above 2x. Below that other platforms can handle it better than Mac from my experience. IDK, it's just something weird they're doing with OpenGL. e.g. upscaling 768p at 16:9 to 1080p would be barely visible anywhere else but on a Mac where it would really stick out.

In the list of features you didn't include texture coordinate interpolation which is the cause of this issue. This is no "complex screen manipulation". This is basic nearest neighbor interpolation from textures and it happens before rasterization of the pixels on the screen. There is no cure for this regardless of platform. There is only the workaround I described in my above post. There is also a workaround where you split every tile into a separate texture and make sure addressing of texture coordinate borders is set to repeat. But having this many small textures is not a good idea as far as rendering goes. Not to mention the tilemap code that would need to be changed to accomodate this.

EDIT: What was MV's base resolution again? 816x something? Anyway, run the game at native resolution without upscaling and it won't happen anymore.
If you're upscaling the base resolution by that much, of course it will happen all the time.

Macs are HiDPI by default. RPG Maker MV is advertised as compatible with Mac, so I don't see how using RPG Maker MV on the Mac as intended could be considered "upscaling the base resolution by that much". Even if you're a Windows user, RPG Maker MV lists "1280x768 or better Display" as the requirement. If DPI is somehow a limitation, then this should be clearly stated in the specifications for RPG Maker MV. I mean, I definitely wouldn't have wasted money and three years of my life developing a game for a toolkit that can't handle common present-day display resolutions.

I said it happens on all platforms. Why are you so defensive of Mac?

I'm not defensive of Mac. I'm saying that it happens on every single platform that I test it on.

I should have been more clear that it happens consistently on upscaling above 2x. Below that other platforms can handle it better than Mac from my experience. IDK, it's just something weird they're doing with OpenGL. e.g. upscaling 768p at 16:9 to 1080p would be barely visible anywhere else but on a Mac where it would really stick out.
I've never noticed any upscaling issues on Mac in any game, software or toolkit - including every single HTML5 toolkit that I've tried - except for RPG Maker MV.

In the list of features you didn't include texture coordinate interpolation which is the cause of this issue. This is no "complex screen manipulation". This is basic nearest neighbor interpolation from textures and it happens before rasterization of the pixels on the screen. There is no cure for this regardless of platform. There is only the workaround I described in my above post. There is also a workaround where you split every tile into a separate texture and make sure addressing of texture coordinate borders is set to repeat. But having this many small textures is not a good idea as far as rendering goes. Not to mention the tilemap code that would need to be changed to accomodate this.
I'm not sure what you mean by "list of features" or what "texture coordinate interpolation" that you expected me to provide. Could you clarify?

EDIT: What was MV's base resolution again? 816x something? Anyway, run the game at native resolution without upscaling and it won't happen anymore.
As I said in my previous post, I did run it at native resolution when I ran it on Windows. Same problem.

And again, if RPG Maker MV can't handle upscaling then it shouldn't be released for Mac, which is upscaled by default. It also shouldn't be released for Windows with a specification that says that it's compatible with "1280x768 or better Display".
RMMV's resolution statement is for the maker, not for the games. DPI has nothing to do with this, it's pure resolution. Pixels, not inches. I already said it happened on every platform multiple times, I'm not sure why you are reiterating this.

You were name-dropping "aspect ratios, pixel rounding, tile and sprite rendering, delta time, resolutions, zooming and complex screen manipulation" (which are loosely connected, "time delta" having basically nothing to do with any of the rest, "tile and sprite rendering" being literally the same basic textured polygon rendering) and didn't mention texture coordinate interpolation so I had the impression you were more versed in the terminology. Look up on Google the terms "texture coordinate interpolation" and "bilinear interpolation". It's difficult to explain just verbally since it's a very visual thing so I won't bother.

As I said, there is a workaround for your problem, but it requires reworking the tileset textures (could be done with Python and PILLOW quite quickly, I use a similar approach in my own game) and customizing the tilemap code to account for the pixel offsets. Or make sure your game runs in proper native resolution and ignores DPI scaling.
RMMV's resolution statement is for the maker, not for the games.

Says who? When I buy a game development toolkit the implication of actually being able to make a game is as important - if not more important - than the software used to make it. Any specification that is listed I'm going to assume applies to game builds as much as to the creation software unless otherwise specified. Especially when these features are contemporary standards.

DPI has nothing to do with this, it's pure resolution. Pixels, not inches. I already said it happened on every platform multiple times, I'm not sure why you are reiterating this.

You said "If you're upscaling the base resolution by that much, of course it will happen all the time." DPI is in reference to HiDPI - which is the name of Apple's pixel doubling mode - which is what we talked about before you entered the thread and offered your perspective on Apple products and pixel doubling. "DPI" is also the percentage-based measurement used in Windows when referring to pixel doubling.

You were name-dropping "aspect ratios, pixel rounding, tile and sprite rendering, delta time, resolutions, zooming and complex screen manipulation" (which are loosely connected, "time delta" having basically nothing to do with any of the rest, "tile and sprite rendering" being literally the same basic textured polygon rendering) and didn't mention texture coordinate interpolation so I had the impression you were more versed in the terminology. Look up on Google the terms "texture coordinate interpolation" and "bilinear interpolation". It's difficult to explain just verbally since it's a very visual thing so I won't bother.

I asked because I wasn't sure which "feature list" you were referring to.

I understand what you're talking about in regards to interpolation, but I don't see how this relates at all to what is sprites being rendered independently and inconsistently with tiles. I'm not just able to simulate event sprite tearing, but event lag also, which is completely consistent with the tearing. This isn't an issue with the event sprites not being able to extend beyond their borders, this is an issue of event positions not being positioned properly on refresh.

Issues like these were common back in 2014-2015 when HTML5 game development was new, video cards had vsync glitches, browsers weren't caught up and HTML5 game engines didn't have good enough technology stacks to handle graphical inconsistencies, but every single major HTML5 game engine has resolved those issues now.

This is not something that should happen in a contemporary HTML5 game running in Chromium via NWjs. I've been doing HTML5 game design for years and RPG Maker MV is literally the only engine that I've encountered that has tearing issues like this in 4-5 years.

Also, the reason why I mentioned delta time is because I offered it as a hypothesis relating to the inconsistency between sprites and tiles.

As I said, there is a workaround for your problem, but it requires reworking the tileset textures (could be done with Python and PILLOW quite quickly, I use a similar approach in my own game) and customizing the tilemap code to account for the pixel offsets. Or make sure your game runs in proper native resolution and ignores DPI scaling.
This entirely defeats the purpose of using RPG Maker MV.
3 years went into your game and this small hurdle makes you give up on it? I guess I can't help you then. ¯\_(ツ)_/¯
3 years went into your game and this small hurdle makes you give up on it? I guess I can't help you then. ¯\_(ツ)_/¯
I'm not giving up. I'm still going to spend some time conducting all the troubleshooting steps that I've promised to do, but the idea that this is a rendering issue in the manner that you described makes no sense, because it's obviously an issue of RPG Maker MV failing to position sprites consistently with tiles in the same manner that every other modern HTML5 engine manages to do, and if this issue can easily be reproduced using RPG Maker MV's advertised out-of-the-box features then it's something that the developers need to fix.

Also, regardless, of this, I appreciate the input and the attempt to help, so thank you for that.

Original thread: https://forums.rpgmakerweb.com/threads/huge-issues-with-charset-lag.106617/