Change Tile Size

● ARCHIVED · READ-ONLY
Started by Shaz 19 posts View original ↗
  1. 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
    Spoiler
    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
  2. 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 
  3. 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?
  4. 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.
  5. Thank you Shaz!  :)
  6. Soatz said:
    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.

    fm2107 said:
    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.
  7. 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.
  8. 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?
  9. 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?
  10. 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.
  11. 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.
  12. 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.
  13. MikeMakes said:
    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.
  14. How do I change the game resolution to scale with the tiles? 
  15. 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');
  16. Shaz said:
    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/
  17. Sophitia said:
    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  >_>
  18. 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.