Change Tile Size

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,070
Reaction score
13,690
First Language
English
Primarily Uses
RMMV
Change Tile Size
by Shaz
version 1.1 2016.10.23

Introduction
This plugin allows you to change from the default tile size of 48x48 to something larger or smaller.

How to use
Add to your plugins folder (file name should be ChangeTileSize.js).
Set the Tile Size parameter to whatever you want your tile/grid size to be (ex 32).
If you want to edit your maps in the editor, duplicate your img/tilesets folder and set the Tileset Image Folder name to the new folder name - remember to include the / at the end. Then in the original img/tilesets folder, resize your images so they match a 48x48 tile size.

If you use parallax maps and want to edit your maps in the editor, duplicate your img/parallaxes/ folder and set the Parallax Image Folder name to the new folder name - remember to include the / at the end. Then in the original img/parallaxes folder, resize your images so they match a 48x48 tile size.

The new folders created are the ones that will be used when playing the game, and should contain your tilesets/parallaxes at the correct size. The originals are only going to be used for the editor, and resizing will lower the quality of the graphics, but it should be enough to allow you to work with your maps and events. These files should be removed when you build your game for distribution.

Plugin
Download from pastebin

Note - for anyone who's trying to increase the tile size, so you don't have to go searching for it, here's a mod you can make to allow Pixi to load larger files. Many thanks to Brogar for these instructions!

Credit
- Shaz

Terms
- free for use in commercial games

Revisions
Code:
1.1   2016.10.17  Catered for Tilemap tilesize to reduce choppiness
                  Removed dependency on js file name
      2016.10.23  Ensure correct resources are included in build
1.2   2017.04.12  Fixed issue with 'exclude unused resources' on deployment
 
Last edited:

Soatz

Villager
Member
Joined
Oct 23, 2015
Messages
14
Reaction score
1
First Language
Italian
I'm trying to use 16x16 tiles but i find some obstacles :/

If i resize my tiles to match 48x48 they still look wrong when mapping in the editor, while resizing them to 24x24 looks good in the editor and bad while playing t___t 
 

fm2107

Veteran
Veteran
Joined
Jun 12, 2014
Messages
77
Reaction score
19
First Language
english
i followed the instructions, i put my 2 tilesets that i want to use at 32x32 named them wmap1 and wmap2 original size of 32x21 into a folder called img/tilesets32 then i put resized ones of 48x 48 into img/tilesets, loaded them up in the data base and when i got to play the game it says img/tilesets21/wmap1 or wmap2 not found evn though its clearly there. 

nvm problem fixed, but i have another question, if i want to do this, all of my tile sets have to be 32x32 correct?
 
Last edited by a moderator:

MikeMakes

Veteran
Veteran
Joined
Sep 30, 2015
Messages
186
Reaction score
46
First Language
English
Primarily Uses
When I use only this plugin for 32x32 tiles on a 70x30 map, the scrolling feels laggy/choppy. Is there a way to make it run smoother?

It runs smoothly when the plugin is off.

Edit: 

I turned off the Plugin and set the tile size in rpg_objects to 32x32 and still have this problem.

It appears that it is the engine itself that doesn't update scrolling correctly for tile sizes other than 48x48.
 
Last edited by a moderator:

JAD94

The lunar knight
Veteran
Joined
Feb 18, 2014
Messages
662
Reaction score
189
First Language
English
Primarily Uses
RMMV
Thank you Shaz!  :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,070
Reaction score
13,690
First Language
English
Primarily Uses
RMMV
I'm trying to use 16x16 tiles but i find some obstacles :/

If i resize my tiles to match 48x48 they still look wrong when mapping in the editor, while resizing them to 24x24 looks good in the editor and bad while playing t___t 
If you want to use them in the editor, you need TWO folders for your tilesets.  The first one, img/tilesets are the ones you resize to the 48x48 tile size.  They will not look great in the editor, but you should be able to recognize your map properly.  The second folder will have the 16x16 tiles and is the folder name you put into the plugin.  This allows the game to be played properly.

If you are doing that and it's not working, could you please provide all of the following screenshots - your img folder listing so I can see what folders you have created.  One tileset from each folder (the same tileset from the two different folders).  A screenshot of the Change Tile Size plugin window so I can see your settings.  A screenshot of one of your maps in the editor.  A screenshot of the same map in the game.

i followed the instructions, i put my 2 tilesets that i want to use at 32x32 named them wmap1 and wmap2 original size of 32x21 into a folder called img/tilesets32 then i put resized ones of 48x 48 into img/tilesets, loaded them up in the data base and when i got to play the game it says img/tilesets21/wmap1 or wmap2 not found evn though its clearly there. 

nvm problem fixed, but i have another question, if i want to do this, all of my tile sets have to be 32x32 correct?
Your tileset folder name is tilesets32, not tilesets21.

You're correct - ALL tilesets need to be based on 32x32.  The plugin is for the whole game, not just for individual maps, so you can't have some maps at 32x32 and some at 48x48.
 

Cephalophane

Villager
Member
Joined
Jan 12, 2014
Messages
26
Reaction score
6
Primarily Uses
I feel like I'm probably missing something obvious, but this just doesn't seem to 'turn on' for me. I've had success with Yanfly's scripts but after turning this one on the game doesn't seem to recognize that it exists at all.

It's in a new project, in which this is the only active script. The game doesn't look in the new tilesets folders, it just loads the original ones.

The only possible reason I can figure is that I'm using the trial version.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,070
Reaction score
13,690
First Language
English
Primarily Uses
RMMV
Nope - the trial version IS the full version - the only difference is that you have a set period to use it.

Can you please post a screenshot of the plugin window so I can see how it's set up?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,070
Reaction score
13,690
First Language
English
Primarily Uses
RMMV
And the tilesets in img/tilesets are all resized to be 48x48, and those in img/tilesets16 are all 16x16 tiles?

Do you realise this actually doesn't change anything in the editor, but only when you play the game?  The editor is still (and always will be) 48x48?
 

Cephalophane

Villager
Member
Joined
Jan 12, 2014
Messages
26
Reaction score
6
Primarily Uses
Yep, the files in img/tilesets16 have 16px tiles, and the files in img/tilesets have 48px tiles.

I even tried to delete the files from img/tilesets16 to reproduce the error somebody had earlier in the thread, but the game doesn't seem to notice. Instead, it displays the files from img/tilesets. (In-game, not in-editor.)

It's really just as if the script isn't there at all.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,070
Reaction score
13,690
First Language
English
Primarily Uses
RMMV
Oh - the plugin name is wrong.  You must save the file as ChangeTileSize.js

I can see this is going to be a problem ... we need to state what the file name must be, or we need to provide it as a file to be downloaded and not as text to copy & paste.
 

Cephalophane

Villager
Member
Joined
Jan 12, 2014
Messages
26
Reaction score
6
Primarily Uses
Right, right. That makes sense. Thank you very much for taking the time to help out.

I'll edit the post with results. Flawlessly, cheers.
 
Last edited by a moderator:

Sophitia

Veteran
Veteran
Joined
Feb 13, 2014
Messages
32
Reaction score
4
First Language
English
Primarily Uses
When I use only this plugin for 32x32 tiles on a 70x30 map, the scrolling feels laggy/choppy. Is there a way to make it run smoother?

It runs smoothly when the plugin is off.

Edit: 

I turned off the Plugin and set the tile size in rpg_objects to 32x32 and still have this problem.

It appears that it is the engine itself that doesn't update scrolling correctly for tile sizes other than 48x48.
Yeah, I'm having the same choppiness/lag issue (on both 76x76 and 96x96), which is really a bummer because the plug-in itself is quite amazing.
 

GambleMountain

Veteran
Veteran
Joined
Oct 14, 2015
Messages
325
Reaction score
165
First Language
English
Primarily Uses
N/A
How do I change the game resolution to scale with the tiles? 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,070
Reaction score
13,690
First Language
English
Primarily Uses
RMMV
You would need a resolution changing plugin (I think Yanfly Core has this), or just add a command to the main.js to change it.

I think the command would be Graphics.initialize(width, height, 'auto');
 

Soatz

Villager
Member
Joined
Oct 23, 2015
Messages
14
Reaction score
1
First Language
Italian
You would need a resolution changing plugin (I think Yanfly Core has this), or just add a command to the main.js to change it.

I think the command would be Graphics.initialize(width, height, 'auto');
Hi Shaz,

sorry for late reply (i'm kinda busy these days ^^) after reading what you wrote here i understood the mechanism of your plugin and got it the right way :D

I found that there may be some other problems and i don't know if they are either caused by:

  • YEP core plugin 
  • your ChangeTileSize plugin
  • Pixi.js
The main bug is that even if you change the scaling option from Linear to Nearest there is something bad that happen while upscaling your game D:

This mostly happen with 16x16 or with any low resolution :3

Here's the link with a lot of screens of the problem! ^^

http://forums.rpgmakerweb.com/index.php?/topic/47264-problem-with-tiles-dimension-%E2%89%A0-48x48

Thanks again for the help, i hope to be helpful as soon as i have a break from university ^^

Soatz

EDIT: 

This has already been solved in this thread, thanks anyway ^_^

http://forums.rpgmakerweb.com/index.php?/topic/47504-how-to-remove-blur/
 
Last edited by a moderator:

JAD94

The lunar knight
Veteran
Joined
Feb 18, 2014
Messages
662
Reaction score
189
First Language
English
Primarily Uses
RMMV
Yeah, I'm having the same choppiness/lag issue (on both 76x76 and 96x96), which is really a bummer because the plug-in itself is quite amazing.
Any clue how to fix this?I get the same thing  >_>
 

MikeMakes

Veteran
Veteran
Joined
Sep 30, 2015
Messages
186
Reaction score
46
First Language
English
Primarily Uses
Last edited by a moderator:

MikePjr

Artist
Veteran
Joined
Nov 7, 2012
Messages
758
Reaction score
468
First Language
English
Primarily Uses
Ugh, i suck.. i'm not getting the instructions.

Rename what?

Do you keep 2 different folders?

Or tiles with slightly different names?

I'm having hell wrapping my brain around this.

What do i name what folder to what?

I thought this script worked in that during play, it called the tiles from a different folder, but the editor used the images from the default folder?

I wish someone would make a video better showing how this works.

Easier to fallow those types of instructions than reading.... my comprehension skills suck so hard.

Never Mind, i found a video.. ugh i suck.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 3)

Latest Threads

Latest Profile Posts


My only regret is the portal mirror effect is too subtle to show up in these GIFs. It probably just needs more sparkles. :LZSwink:
Microsoft: Hey, let's waste money advertising the Xbox Series X when nobody has any in stock, we don't seem to be making more, we aren't taking preorders and you can't get on a waiting list. BEST. IDEA. EVER.
So I'm practicing ITC with a spirit box, and decide to try to contact my deceased soulmate. It actually gave me multiple identifiers. Me, still a bit skeptical, asked aloud "Fine but does he still love me?" and the box spoke and printed the word "Forever" at the same time. Been a mess of tears since. :kaocry:
Been scratching away at my game and making progress, but just had a revelation. I'm working in full screen and adjusting all my pictures accordingly, but will they resize if someone's screen is smaller?? I hope this doesn't turn out to be a problem later.

Forum statistics

Threads
105,636
Messages
1,015,181
Members
137,310
Latest member
MistysKarma
Top