Keep Camera inside Map when player is close to borders with 16x Tile Size?

I use 16x Size for my tiles and my game has 1104x624 resolution. I use a 300% zoom with the integrated ScreenZoom plugin on the map or it would appear really small on the screen. I can't lower the resolution because it would mess up the UI and my high resolution assets.

When scrolling the map, I would like the camera to hit the map border and not move beyond that so that the "void" is not visible and the player uncentered.

In short, I don't want the camera following the player at the edges of the map. :LZSproud:

Of course, if the map has enough tiles to cover the game's resolution.
This works on 48x tile size because it covers all pixels but not on 16x. How can I solve this? :0

1727813249290.png


example.png
while I don't own MZ or know the integrated zoom plugin/function,
you might be able to see how much it goes over.

from there, you might find a way to stop X from going over
like: 0,1,2,3,4 so X stop at 4 when on the left, 38 to the right (if its 43 for example)
the same from the top and bottom, so look for those or use variables to cap it
for each map 🙂

I don't know if there is another way, but you can play with values if available.
Wouldn't it be better to scale up your graphics x3 and use them in 48x48 tile size, instead of using a permanent 300% zoom?

I can imagine that'll cause some more trouble in the long run.
I was looking for the same thing and I succeded using a 16x12 tiles maps so that the camera never scrolls to the sides. My resolution is 768x576 and I don't use a permanent zoom.
It might be either the zoom or the map dimension making your camera move.
Wouldn't it be better to scale up your graphics x3 and use them in 48x48 tile size, instead of using a permanent 300% zoom?

I can imagine that'll cause some more trouble in the long run.
@Zia_ I did that before, but I use parallax mapping and I have big maps. Loading a 3000x3000 image instead of a 1000x1000 image really does a cut on the performance. Also, I would have to deal with two different images.

For now, I will do that anyway and try to make smaller maps. The 16x tile size is implemented reaaally badly as of now. The fact that I need a zoom plugin to make the game playable is absurd.

I'm still trying to find a way to upscale the map without also scaling the menus. The Screen Scale option messes up the UI.

I was looking for the same thing and I succeded using a 16x12 tiles maps so that the camera never scrolls to the sides. My resolution is 768x576 and I don't use a permanent zoom.
It might be either the zoom or the map dimension making your camera move.
@SIDD Thanks for sharing your solution! Unfortunately, I really need the screen to show 23 x 13 tiles (with 1104 x 624 resolution) in my game. The problem is the resolution showing black space, not the zoom plugin.


Edit: I tried Arthran's Map Zoom Fix at 3x Zoom but it seems to make the game crash when transferring to another map. This does not happen without the plugin.

Also, it cuts the tiles on the corners? :0 The tiles don't fit the screen, but they should since 1104 and 624 are divisible by 48. The Map is 23x13.


I fixed this problem by placing the plugin towards the top of the plugin list. After zooming with this plugin, the tile don't fit perfectly the screen since the screen is not divisible anymore but the black bars are gone!
Wouldn't it be better to scale up your graphics x3 and use them in 48x48 tile size, instead of using a permanent 300% zoom?
reason for zoom is a way to zoom out later for checking, around the map temporarly.
and zooming in can have more parts inside of those as well.

@Angy1910 what plugin did you use and how does it crash on transfering?
as it could be patched otherwise.
reason for zoom is a way to zoom out later for checking, around the map temporarly.
and zooming in can have more parts inside of those as well.

@Angy1910 what plugin did you use and how does it crash on transfering?
as it could be patched otherwise.
I wrote about this on the plugin thread, but it was a incompatibility with the plugins I have. I use Arthran's Map Zoom Fix (Zoom.js). You can find it in the thread I linked.

I fixed it by placing the plugin at the top of the list.

Original thread: https://forums.rpgmakerweb.com/threads/keep-camera-inside-map-when-player-is-close-to-borders-with-16x-tile-size.172291/