sateliteixeira

Villager
Member
Joined
Oct 3, 2019
Messages
6
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
Hi, everyone!

Does anyone have a fix for the gap issue in tilesets when you deploy MZ games to Android?
In MV I was able to fix it setting "canvas" rendering in Community_Basic.js plugin.

I noticed that SceneManager.preferableRendererType method doesn't exist anymore in MZ rpg_managers file.

These following screen captures were taken from my real Android device (Samsung S7).

Screenshot_20210925-153614.jpg
Screenshot_20210925-153723.jpg


I'll apreciate any support from you guys!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,670
Reaction score
15,291
First Language
English
Primarily Uses
RMMV
It looks like it's only happening on that tree. Are you sure it's not something in the B tileset? Are you using ALL default tilesets or have you added your own images or edited the existing ones?

this doesn't happen when you playtest?
 

sateliteixeira

Villager
Member
Joined
Oct 3, 2019
Messages
6
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
It looks like it's only happening on that tree. Are you sure it's not something in the B tileset? Are you using ALL default tilesets or have you added your own images or edited the existing ones?

this doesn't happen when you playtest?
Yes, I noticed that happens with all the trees...

After create a new game, I just spread some trees / grass on the map and deployed to web.

Like the issue is ocurring with images over each other. The tileset is the default RTP.
Playtest on Windows and Chrome by XAMPP (localhost) are all fine.

Seems like the webview on Android have problems to work with WebGL. I always have to change to canvas on MV because of these gaps between tiles.

I'm out of ideas to work around with MZ, except if I change to parallax that increases the size of the project.
 

Quexp

Lifelong Learner
Veteran
Joined
Jun 18, 2018
Messages
554
Reaction score
1,136
First Language
English
Primarily Uses
RMMV
I don't have a solution but can confirm that this issue can be replicated.

I have the same problem but my understanding is that they removed Android support when rolling out MZ. The touchscreen support works great though and getting an MZ game to run in a mobile browser is better than I expected. Anyways, I hope the info helps and best of luck as you seek a solution!

1632626531841.png
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
862
Reaction score
433
First Language
PT-BR
Primarily Uses
RM2k3
I've seen this problem in games made with HTML5 without using Rpg Maker. This issue may vary from WebView and Smartphone resolution.

I don't really remember the parameters I used to solve this, but it's almost certain that I changed the INDEX.HTML viewport.

Include metatag on index.html:
HTML:
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, minimal-ui" />
Or:
HTML:
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />

If none of this works, change the user-scalable=no to "yes" and try to zoom in or out with two fingers touching the screen.

I'm currently getting an android device to test.
 

sateliteixeira

Villager
Member
Joined
Oct 3, 2019
Messages
6
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
I may have found the solution! It worked for me in this project.

If you could test it, @Quexp , will save me some time in other projects deployment.

The change is in Main.js file:

onEffekseerLoad() {
this.eraseLoadingSpinner();

PIXI.settings.RENDER_OPTIONS["height"] = 624;
PIXI.settings.RENDER_OPTIONS["width"] = 816;
PIXI.settings.PRECISION_FRAGMENT = PIXI.PRECISION.HIGH;


SceneManager.run(Scene_Boot);
}

Just before Scene_Boot, add these 3 lines of PIXI settings. In my case, the project resolution is 816x624 (default RPG Maker MZ).
The original width and height was 800x600. Oddly, even on Android emulation the bug wasn't occuring.

The lines are gone, finally! I found this tip on the following link (from ivanpopelyshev):
https://github.com/pixijs/tilemap/issues/16

I'll make some more tests and tell you if it's a permanent solution.

Thanks!
 

Quexp

Lifelong Learner
Veteran
Joined
Jun 18, 2018
Messages
554
Reaction score
1,136
First Language
English
Primarily Uses
RMMV
I tried the above suggestions but no change. It was worth a try though! My game is set for 624x846, on Itch, but tried the 816 width to see what'd happen. No luck. That link was interesting though. Thanks for sharing!

I'm happy enough as I'll be targeting Windows users but hit me up if you need anything else tested. :)
 
Last edited:

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
862
Reaction score
433
First Language
PT-BR
Primarily Uses
RM2k3
I'm using Android 5, I created an APK with any game I downloaded from RMMZ and the problem doesn't happen, I don't know if it's because the WebView was updated:

If anyone has a game hosted on GameJolt or Itch.io and can pass the link I can test it to try to understand the cause of the problem.
 

sateliteixeira

Villager
Member
Joined
Oct 3, 2019
Messages
6
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
Indeed it's a device issue, @Dev_With_Coffee .
On my device (Samsung S7 - Android 8.0.0) the glitch was gone with those PIXI settings.
As far as I learned, it may be related with the interpolation when scaling the tiles to the device screen. It's frustrating to not know if the current PIXI setting will affect other Android environments.

I tried to add the 3 lines of code to my other MV projects and it worked, again, on my device.

@Quexp , I recommend you to play with the PIXI settings. I found the following documentation with new tips:

// Use the native window resolution as the default resolution
// will support high-density displays when rendering
PIXI.settings.RESOLUTION = window.devicePixelRatio;

// Disable interpolation when scaling, will make texture be pixelated
PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;
Link: https://pixijs.download/dev/docs/PIXI.settings.html

I think it's possible to include these settings as a plugin for changing in-game by the user in case of damaged images.

As my problem is solved, the thread may be closed.
It's up to you keep this thread open until a solution that covers everyone's glitches.

Thanks to all of you!
 

Quexp

Lifelong Learner
Veteran
Joined
Jun 18, 2018
Messages
554
Reaction score
1,136
First Language
English
Primarily Uses
RMMV
YAY - I'm glad you got your game working! Congrats. Thanks for sharing your resolution too. :)
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
862
Reaction score
433
First Language
PT-BR
Primarily Uses
RM2k3
@sateliteixeira I did the test on a virtual Android 5.0 and a device "Samsung S4 (GT-I9515)", none had the problem, when I saw this problem it was before updating the WebView but I can't guarantee.

@Dev_With_Coffee - here's mine. I'll see if I can find other MZ in-browser games to see if they have it too.

Edit:
- Here's another in case it helps.
- This one seems to be okay too.
I will test it on Android 10 and 11 as soon as possible.
 

Quexp

Lifelong Learner
Veteran
Joined
Jun 18, 2018
Messages
554
Reaction score
1,136
First Language
English
Primarily Uses
RMMV
Hmm, I'm curious so see if I can update Webview.

EDIT: Updated, no luck. Also tried Beta and Canary versions with no success. If you want, I can try more PIXI settings later. It wouldn't be until tomorrow though.

Also, no need to rack your brain over it unless you're doing it for yourself or the community. :)
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,873
Reaction score
8,585
First Language
German
Primarily Uses
RMMV
The problem is known and if you know where it comes from you can even replicate it on a PC.

Basically those lines are an artefact of the engine having problems with a screen size that is not a multiple of the grid size. If the screen size is slightly larger than the mapgrid, some tiles get randomly spaced that way because the engine tries to fill the screen to fit the tiles on both sides.

The usual solution on the PC is something you probably have read multiple times: make the screen size a multiple of the grid size (48x48), that is where those numbers come from.

I assume that some android devices have problems with unusual screen sizes and force the default sizes on their games. And then it depends on the device if the correct but unusual screen sizes can be forced in to prevent the effect.
 

Quexp

Lifelong Learner
Veteran
Joined
Jun 18, 2018
Messages
554
Reaction score
1,136
First Language
English
Primarily Uses
RMMV
That makes sense!

This has been an interesting thread and I learned a few extra things from you guys too.
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
862
Reaction score
433
First Language
PT-BR
Primarily Uses
RM2k3
Also, no need to rack your brain over it unless you're doing it for yourself or the community. :)
It's for the community and out of curiosity.

not a multiple of the grid size
This makes perfect sense, I saw this in WebBrowser games made with older API's that were placed inside IFRAMEs, so I deduced that it would be the invisible scrollbar that would be breaking the screen.
The strange thing is that RMMV does not seem to happen and so it is assumed that in RMMZ this would also be "fixed" or adapted.
 

sateliteixeira

Villager
Member
Joined
Oct 3, 2019
Messages
6
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
I made new tests and the only thing I needed to work properly is PIXI.settings.PRECISION_FRAGMENT = PIXI.PRECISION.HIGH; before Scene_Boot in main.js file.

My device's resolution screen is 2560x1440 and my game's resolution is 848x480 (for bigger sprites on the screen).

Funny because I tried to emulate the glitch with a resolution not been multiple of 48 pixels (tile measure). Even so, the glitch is gone.

I'm building an APK file on Android Studio with WebView in fullscreen. Was good to know that the glitch occurs in webpages also.

My Android System WebView is deativated on the device and Chrome version is 94.0.4606.61 on the app info.

Android devices, man... What a pain!
 

Latest Threads

Latest Posts

Latest Profile Posts

I've been busy trying out different art styles for my game.

Enemies deserve some spotlight also
hackingCompressed.gif
I think I can make a text-based mini-game with almost zero art assets and with code only...just a lot of code as assets all by themselves. :kaojoy:
A video update on the progress I've been making on the cutscenes. :kaosalute:

I wonder if color LUTs is possible for RPG Maker. It would be game changer and can replace the not so good looking tint screen

Forum statistics

Threads
115,866
Messages
1,093,580
Members
151,096
Latest member
RPGThrowawaymaker
Top