The weird implementation of 16x16 Tiles

I have to admit, the moment I heard that the maker will soon support 16x16 tiles again I was pretty happy.

So I created a project and started testing how the whole thing was implemented and was... confused....

I first created a project that had a resolution of 570x322px. Just to see how well the maker can handle small windows. I mean there was a function in the database that you can scale the window by x, so you can still see the game on modern monitors. So I thought that was the way to go.

However, it confused me even more. Because this of course stretches the HTML5 canvas, which leads to a massive blur on bigger moniitors, making it look like I forgot my glasses.

It looked like this:
upscale_maker_mz.jpg

(Resolution: 570x322px upscaled to 2560x1440px)​

Tbf this isn't suprising, because the image get's scaled up a lot, causing the canvas to blur like hell, because the upscale filter that is used on normal HTML5 canvas elements isn't that good for pixel stuff.
To counteract this, I could of course set the canvas rendering to pixelated. However, this would cause visual "glitches" on some monitors, that look like lines are running through the game canvas. (Not screen treaing, more like wobbleing pixels)
Also that wouldn't fix another issue with the Window size, wich are the menues in the game, that simple doesn't work with small game windows in most cases.

window_small_menu.png

window_small_fight.png

(Resolution: 570x322px with default window settings)

So I wanted to try another way by simply zooming into the map.
Of course, this works quite well (although only with plugins). However, here of course comes the problem that only the map is in pixel style, but the rest of the game of course is still in for example 1280x720p. Which causes a big difference between UI size and game. Which leads to elements being partly on "half" pixels. Since UI elements positions are based on the actual screen size and not the pixels on the map I zoomed in.

All this now leads me to a question: How am I supposed to work with this? Both solutions lead to problems that are difficult to work around.
It seems like the only good solution is to write a better upscaling for a HTML canvas, maybe something like Impact, so it can look like in CrossCode:

image.png

(Comparison between CrossCode and an RPG Maker upscale. Both games in 570x322px scaled to 2560x1440px.)

Is there anyone who tired to attempt this?
The idea behind the added variable tilesize was to have more different tile option available without changing the screen size - which is why none of the menu functions were modified for other sizes.

you'll have to use a plugin to change the menu to fit different sizes.



The rest are the normal effects of zoom or resizing.
But to help you solving them let's ask from the other side: what effect do you want?
Because if it is just a pixellated look, it would probably be better to use an image program to upscale the 16x16 resources by a factor of 3x to 48x48...
I want to work with a small base resolution for the windows (something like 250x160px) and be able to scale that up in a better way, then the default HTML5 Canvas upscaling method. Just like in the HTML5 Impact engine. Zooming in or scaling up the sprites and tiles is a work around, but it makes everything just complicated and would lead to events, menues, pixel fonts and some other elements to be misaligned with the pixel tiles.
all zooms have physical limitations that cannot be circumvented - basically only full zooms can be clear (2x 3x 4x and so on).
any other zoom factor (like 150%) will result in either distortions or blurring, no way around.

the reason why the engine got a variable tile base is to prevent zooming, not to enable it.
It is there to allow the use of other size tiles without the need for any zoom, exactly because you almost always lose quality on zoom.

For example your 250x160 screen size would allow a good result at 1000x640 only, any other number would again cause distortions - and 1000 is not a common windows size.
I know how upscaling works, but the impact engine is also using HTML5 Canvas + JS and has a way better upscaling method, then the Maker. It creates a sharper screen by using the original resolution of 570x322 sclaes that up by 4 (pixelated) in engine, and uses this to fit into the screen, creating less blur. For the fit it just scales up in height, creating black bars on some monitors but keeping the original ascpet ratio. (At least, this is how it works in CrossCode I think)
You'll need a plugin to change the rendering behaviour. I'd suggest this:
Alternatively I threw this together:
Spoiler: plugin code
JavaScript:
/*:
 * @target MZ
 * @plugindesc Render at integer coordinates.
 * @help Free to use and/or modify for any project, no credit required.
 */
// Render at integer coordinates (e.g. suppress font blur on centred Show Choices).
PIXI.settings.ROUND_PIXELS = true;

// Use nearest-neighbour interpolation (instead of linear) for all bitmaps.
void (alias => {
  Bitmap.prototype.initialize = function() {
    alias.apply(this, arguments);
    this.smooth = false;
  };
})(Bitmap.prototype.initialize);

For the menu problems see if you can find a plugin that zooms only the map, not the entire game? I know there's one around somewhere, but I don't have the link to hand at the moment.
You'll need a plugin to change the rendering behaviour. I'd suggest this:
As I said in my first post, using pixelated upscale can cause visual "glitches" on some monitors, that look like lines are running through the game canvas. (Not screen treaing, more like wobbleing pixels)

Alternatively I threw this together:
This would be a good solution if Bitmap rescaling wouldn't break trhoug the borders of the canvas.

For the menu problems see if you can find a plugin that zooms only the map, not the entire game? I know there's one around somewhere, but I don't have the link to hand at the moment.
As I said in my first post: I don't want to use that method, because it creates problems with misaligned and not consist pixels.
As I said in my first post, using pixelated upscale can cause visual "glitches" on some monitors, that look like lines are running through the game canvas. (Not screen treaing, more like wobbleing pixels)
This is basically inevitable when upscaling to a non-pixel perfect resolution. There doesn't exist a way that allows you to change 1 pixel to 1.2 pixels and still have it look good - the closest solution is blurring.

CrossCode runs in a 640x360 base resolution, so on your 1440p monitor every pixel becomes a 4x4 square of pixels. On the other hand, when your 570x322 game is scaled to 1440p, every pixel will become a 4.491x4.491 square - meaning that sometimes a given pixel will be larger, and sometimes it will be smaller. This can lead to some "wobbling", which is likely what you're experienced.

The simplest solution is to set your game's resolution to 640x360, like many retro-styled games do - this will allow for pixel-perfect scaling on all standard 720p, 1080p, 1440p and 2160p screens.

I'm afraid the only other options within the engine are either blurring or not scaling (which may look rather small). Upscaling the assets directly to 48x48 or switching to Impact should reduce the wobbling, but not eliminate it (and doing the latter would be rather difficult).

Original thread: https://forums.rpgmakerweb.com/threads/the-weird-implementation-of-16x16-tiles.155327/