MV Parallax mapping plugins for MV issues

I don't even need to create an entire map, just cover half of it with the parallax. However, the two plugins i tried for that (TTK fix picture and Galv's layergraphics) both give strange side effect - the picture can't be placed to coordinates and it twitches when player moves. I wonder if anyone ever encountered that kind of a bug in those plugins? Or maybe you have different one to recommend trying.
that sounds as if the picture size is wrong. what is your map size in tiles and the picture size in pixel?

or it could be a looping event - the commands should be given once, not repeatedly.
So while you need to use a parallel event to do this, this parallel should be switched off or erased after one run.
that sounds as if the picture size is wrong. what is your map size in tiles and the picture size in pixel?

or it could be a looping event - the commands should be given once, not repeatedly.
So while you need to use a parallel event to do this, this parallel should be switched off or erased after one run.
Nope, it's no on parallel, here is the event -
1744720135295.png


The map size is 256x30, the original image size were as wide as the map, but i assumed it might cause a problem and reduced it to just 1278x624 pixels, still the same problem.
Parallax mapping REQUIRES that the following size equation is true:

Mapsize in tiles x 48 pixel per tile equals picture size in pixel.
So a 256x30 tiles map requires a picture of 12288 x 1440 pixel.

However reading the first post again begs the question if we are talking about the same thing.
do you want to use parallax mapping at all (using a picture as the map)?
or do you want to cover half the screen with a picture, which is something entirely different?

because the second case does not use parallax plugins at all, that would be simply show picture event command.
because the second case does not use parallax plugins at all, that would be simply show picture event command.
Yep, that would be the case. But i tried it not only with layers plugin, but also with fixed picture and it still twitches even if i simply use show picture command.

I plan to have some events on top of that picture, but only to show animations, nothing interactable or walkable. Just make part of the map as a picture.
then show us the event you're using for show picture, and give both your project's screen size and the picture size. again it should not twitch if done correctly, but we can't help without seeing what you have done.
then show us the event you're using for show picture, and give both your project's screen size and the picture size. again it should not twitch if done correctly, but we can't help without seeing what you have done.
I already posted the event, but here is full picture.
1744741788644.png
I don't know screen size of the probject, i guess the default one? I only use plugin to start the game in full screen but nothing else for graphics.

The picture size was 1278x624, now it's 12288 x 1440 as you suggested.

Ah, and if you speak about different plugin, event it exactly the same, but instead of 2 plugin commands there is a single show picture.
event it exactly the same, but instead of 2 plugin commands there is a single show picture.
I wanted to see the settings used in the show picture command, because that is not as simple to use correctly unless you kow exactly what you're doing.

and using show picture means that the picture needs to be screen-sized, not larger.
the screen size is set in the community basic plugin or some other plugin if you're using that, and defaults to 816x624 if not changing it with a plugin.
so neither of your two picture sizes is correct for that option.
I wanted to see the settings used in the show picture command, because that is not as simple to use correctly unless you kow exactly what you're doing.

and using show picture means that the picture needs to be screen-sized, not larger.
the screen size is set in the community basic plugin or some other plugin if you're using that, and defaults to 816x624 if not changing it with a plugin.
so neither of your two picture sizes is correct for that option.
Made it 816x624, it still shaking violently. I made it non-transparrent now, so by looking at the edges of the picture you can see how much it shakes. And it seems like the shaking are not present at the very start of the game, and starts to occur a bit later.


As for show picture -
1744789559225.png
Update - i seem to find the issue, the shaking disappears if i remove the speed change command. But i don't understand how the speed of the character can cause the pictures to shake. Should probably create new post about this issue, but maybe someone who uses parallaxes encoutnered such issue?
It looks like some difference in calculating the position of a display object with fractional coordinates. That might be at the JS level, or at the renderer level. I haven't gone looking for the plugins you mentioned.

Like most modern programming languages, JS uses a binary number storage system for efficiency. That means values like 0.02205 and 0.6921 are likely to cause precision problems. Maybe try:
  • Player: 0.0234375 (1/64 + 1/128, i.e. 0.0000011 in binary).
  • Event: 3.75 (2 + 1 + 1/2 + 1/4, i.e. 11.11 in binary).
It looks like some difference in calculating the position of a display object with fractional coordinates. That might be at the JS level, or at the renderer level. I haven't gone looking for the plugins you mentioned.

Like most modern programming languages, JS uses a binary number storage system for efficiency. That means values like 0.02205 and 0.6921 are likely to cause precision problems. Maybe try:
  • Player: 0.0234375 (1/64 + 1/128, i.e. 0.0000011 in binary).
  • Event: 3.75 (2 + 1 + 1/2 + 1/4, i.e. 11.11 in binary).
This is the correct way, right?
1744916780649.png


If i did not do any mistake - then it's not working, image still shaking. It happens regardless of plugins (since the player movement command works even without them, just gives different speed, yet still results in shake).
Or you meant plugins that are used to bind picture to map? Is there others apart from Galv's and TTK? Or no point of trying that since it is the fundamental flaw in the engine?

If so, i wonder how can i get around it... If i go full parallax, the events located on top of it will still shake like crazy. I cannot refuse to use picture since i bought massive amount of tiles just for that location and they would require dozens of tilesets to fit. And at the same time i can't give up on speed change since i need the player to move at specific speed or the entire level won't work.
This is the correct way, right?
That should be OK, yeah. I gave the numbers as 0.0234375 and 3.75 because I thought that'd be more readable, but you can use a sum of fractions if you prefer.

If it doesn't help, though, then you may as well use the values you had before. 😴

Or you meant plugins that are used to bind picture to map?
Yes: I didn't bother looking up the links to the plugins you mentioned. I'll do it now~
I had a quick look at the first one, TTK_FixPicture, and it looks like it was probably based on an old core script version, because the current core scripts floor the coordinates of all pictures. Maybe try replacing these lines in that plugin:
JavaScript:
		    this.x = (-$gameMap.displayX() * 48) + picture.x();
		    this.y = (-$gameMap.displayY() * 48) + picture.y();
...with this:
JavaScript:
		    this.x = Math.floor(-$gameMap.displayX() * 48 + picture.x());
		    this.y = Math.floor(-$gameMap.displayY() * 48 + picture.y());
(I'm not sure if that will cause a different but similar-looking issue re negatives flooring away from 0.)
I gave the numbers as 0.0234375 and 3.75 because I thought that'd be more readable
Tried that as well, did not help. Also i thought that it's because fractions cause isse you gave me calculation to write it down without fractions.
Maybe try replacing these lines in that plugin:
Sadly, still shaking( Why they even have command that changes the speed, if it causes the bug like that?
Sadly, still shaking
Oh. Maybe someone else will have some ideas. 😴

Why they even have command that changes the speed, if it causes the bug like that?
The editor (and therefore the engine) only really supports basic move speeds 1, 2, 3, 4, 5, 6, and 7 if you count dashing with player speed 6.

Are you saying that, using your speed values and no plugins, the shaking happens with normal pictures?
The editor (and therefore the engine) only really supports basic move speeds
I meant the JS itself. All vastness of plugins for RM exists because editor does not support certain functions, but it supports JS calls, so with programming all things that can be done in JS can be done in RM as well. At least that's how it seems to me, but you are an actual programmer and can correct me if i am wrong about this.
And since i doubt that JS only supports basic move speeds (otherwise there won't be a point to have command that changes them), i wonder if this bug is an overlook of script's creators.
Are you saying that, using your speed values and no plugins, the shaking happens with normal pictures?
No way to check that out because without plugins the picture moves along with the player. It does not seem to shake like that, but with it moving itself it's hard to say.
OK, I just realised the old "shaking sprites" core MV bug probably never got officially fixed:
You could try this short plugin to see if it helps (untested):
JavaScript:
/*:
 * @target MV
 * @plugindesc Disable WebGL ShaderTilemap pixel rounding (for map scroll jitter).
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/posts/1510004/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Override - soft-freeze `roundPixels` on WebGL tilemap.
Object.defineProperty(ShaderTilemap.prototype, "roundPixels", {
  value: false, configurable: false
});
It's based on what utunnels posted here:
Doing this might cause tiles to blur while the camera is scrolling. I assume that's why the roundPixels line is there in the first place: to pair with its nearest-neighbour scaling and avoid blur.

At least that's how it seems to me
Spoiler: a response
I meant the JS itself. All vastness of plugins for RM exists because editor does not support certain functions, but it supports JS calls, so with programming all things that can be done in JS can be done in RM as well.
First: a script call is basically as powerful as a plugin. A plugin is preferable (or required in some cases) because of:
  • Timing - a plugin runs on game boot, script calls require an event interpreter;
  • Modularity - plugins can easily be tracked, added/removed, ported to other projects, etc;
  • Efficiency - plugins are compiled on boot, script calls are compiled on the spot.
With the right tools and knowledge, it is possible to make many different things out of a given set of materials. The RPG Maker MV engine is built on HTML5, a suite of tools that lets you make many different things, from simple web pages to 3D browser games. A plugin or script call exposes the power of that underlying toolset. That does not mean the engine supports everything that can be done via a script call!

Also, only the preset methods, over a given range of input values, have been designed and tested for use...so I would only consider those preset methods/values to be supported, and only behaviour arising from use of those methods with supported input values as a bug.

For reference:
Shaz said:
So, if you are not making your game primarily in the editor - if you are doing as much outside the editor as possible and changing the scripts as much as possible so the original MV scripts are no longer used - your game is not "made with MV".

And since i doubt that JS only supports basic move speeds (otherwise there won't be a point to have command that changes them)
The setMoveSpeed method exists for core purposes:
  • For the move command "Set Move Speed";
  • For initialising a character's move speed when appropriate.
As noted, neither of these options natively support non-integer move speeds.
OK, I just realised the old "shaking sprites" core MV bug probably never got officially fixed:
You could try this short plugin to see if it helps (untested):
JavaScript:
/*:
 * @target MV
 * @plugindesc Disable WebGL ShaderTilemap pixel rounding (for map scroll jitter).
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/posts/1510004/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Override - soft-freeze `roundPixels` on WebGL tilemap.
Object.defineProperty(ShaderTilemap.prototype, "roundPixels", {
  value: false, configurable: false
});
It's based on what utunnels posted here:
Doing this might cause tiles to blur while the camera is scrolling. I assume that's why the roundPixels line is there in the first place: to pair with its nearest-neighbour scaling and avoid blur.


Spoiler: a response
First: a script call is basically as powerful as a plugin. A plugin is preferable (or required in some cases) because of:
  • Timing - a plugin runs on game boot, script calls require an event interpreter;
  • Modularity - plugins can easily be tracked, added/removed, ported to other projects, etc;
  • Efficiency - plugins are compiled on boot, script calls are compiled on the spot.
With the right tools and knowledge, it is possible to make many different things out of a given set of materials. The RPG Maker MV engine is built on HTML5, a suite of tools that lets you make many different things, from simple web pages to 3D browser games. A plugin or script call exposes the power of that underlying toolset. That does not mean the engine supports everything that can be done via a script call!

Also, only the preset methods, over a given range of input values, have been designed and tested for use...so I would only consider those preset methods/values to be supported, and only behaviour arising from use of those methods with supported input values as a bug.

For reference:
​


The setMoveSpeed method exists for core purposes:
  • For the move command "Set Move Speed";
  • For initialising a character's move speed when appropriate.
As noted, neither of these options natively support non-integer move speeds.
Your solution does not work, as well as Utunnel's, but the jitter fix from the other post, and the plugin mentioned in first comment (smooth scrolling) both seem to fix the issue. Well, maybe not entirely since camera movement still feels a bit odd, maybe it's because of slow movement when i am not used for that, or maybe it's just because my eyes are really tired and hurting now, so i am seeing things. But i can say for sure that image no longer madly twitches. And that is something i really, really needed. So thank you for your help!

And i really hope that at least this time the solution will not break anything else >_< Oh great code hydra, please spare me and let me sear this head for good!

First: a script call is basically as powerful as a plugin.
So, can you add entire plugin as script call? And if yes, if there is a way to remove it aftewards the same way? I encountered the conflict between two plugins and have no idea what i need to do to get around it. I don't even know why it's cause because it's small plugins that seem to do different things.
Or maybe there is a way to disable and enable plugins via script call?
The RPG Maker MV engine is built on HTML5
Damn, i though it's JS. I once spend... don't remember how long, somewhere between half and full year in attempts to learn HTML before realizing i can't understand much outside of step-by-step guides, and can remember even less, so i moved to other programming languages (with same results). If only my brain worked correctly, maybe i could just code for RM by myself now...
the jitter fix from the other post, and the plugin mentioned in first comment (smooth scrolling) both seem to fix the issue.
Great! 😂

So, can you add entire plugin as script call?
Like I said: yes, but a script call might not be available at an appropriate timing. Also, most changes will persist for the rest of the session (through new/load game) and will be lost once the game is closed. For plugin-like changes, a plugin is generally a better option. 😅

And if yes, if there is a way to remove it aftewards the same way?
A patch that can be turned on/off mid-session must be designed differently compared to a normal patch. The way that the patch is applied makes no difference: to be able to turn it on/off mid-session, you need different code.

i though it's JS
JavaScript is the main HTML scripting language.

HTML5 is a specification for web pages. As well as being a markup language for designing web pages, it also supports APIs for scripting (JS), file access, advanced image/audio/video handling, etc.

Basically, anything a web page can do is part of the HTML5 standard. 👋

Original thread: https://forums.rpgmakerweb.com/threads/parallax-mapping-plugins-for-mv-issues.176970/