Change Tile Size

Discussion in 'JS Plugin Releases (RMMV)' started by Shaz, Oct 24, 2015.

  1. Shaz

    Shaz Veteran Veteran

    Messages:
    35,307
    Likes Received:
    9,840
    Location:
    Australia
    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

    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: Apr 12, 2017
    #1
  2. Soatz

    Soatz Villager Member

    Messages:
    14
    Likes Received:
    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 
     
    #2
  3. fm2107

    fm2107 Veteran Veteran

    Messages:
    77
    Likes Received:
    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: Oct 25, 2015
    #3
  4. MikeMakes

    MikeMakes Veteran Veteran

    Messages:
    158
    Likes Received:
    41
    First Language:
    English
    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: Oct 26, 2015
    #4
    Name likes this.
  5. JAD94

    JAD94 The Noblest of Knights Veteran

    Messages:
    584
    Likes Received:
    144
    Location:
    New York
    First Language:
    English
    Primarily Uses:
    N/A
    Thank you Shaz!  :)
     
    #5
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    35,307
    Likes Received:
    9,840
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    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.

    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.
     
    #6
  7. Cephalophane

    Cephalophane Villager Member

    Messages:
    25
    Likes Received:
    6
    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: Oct 26, 2015
    #7
  8. Shaz

    Shaz Veteran Veteran

    Messages:
    35,307
    Likes Received:
    9,840
    Location:
    Australia
    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?
     
    #8
  9. Cephalophane

    Cephalophane Villager Member

    Messages:
    25
    Likes Received:
    6
  10. Shaz

    Shaz Veteran Veteran

    Messages:
    35,307
    Likes Received:
    9,840
    Location:
    Australia
    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?
     
    #10
    lostdragon likes this.
  11. Cephalophane

    Cephalophane Villager Member

    Messages:
    25
    Likes Received:
    6
    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: Oct 26, 2015
    #11
  12. Shaz

    Shaz Veteran Veteran

    Messages:
    35,307
    Likes Received:
    9,840
    Location:
    Australia
    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.
     
    #12
    Dungeonmind likes this.
  13. Cephalophane

    Cephalophane Villager Member

    Messages:
    25
    Likes Received:
    6
    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: Oct 26, 2015
    #13
    Shaz likes this.
  14. Sophitia

    Sophitia Veteran Veteran

    Messages:
    31
    Likes Received:
    4
    Location:
    United States
    First Language:
    English
    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
    JAD94 likes this.
  15. ConkerMich

    ConkerMich Veteran Veteran

    Messages:
    289
    Likes Received:
    176
    First Language:
    English
    Primarily Uses:
    N/A
    How do I change the game resolution to scale with the tiles? 
     
    #15
  16. Shaz

    Shaz Veteran Veteran

    Messages:
    35,307
    Likes Received:
    9,840
    Location:
    Australia
    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');
     
    #16
  17. Soatz

    Soatz Villager Member

    Messages:
    14
    Likes Received:
    1
    First Language:
    Italian
    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: Oct 28, 2015
    #17
  18. JAD94

    JAD94 The Noblest of Knights Veteran

    Messages:
    584
    Likes Received:
    144
    Location:
    New York
    First Language:
    English
    Primarily Uses:
    N/A
    Any clue how to fix this?I get the same thing  >_>
     
    #18
  19. MikeMakes

    MikeMakes Veteran Veteran

    Messages:
    158
    Likes Received:
    41
    First Language:
    English
    Last edited by a moderator: Oct 28, 2015
    #19
  20. MikePjr

    MikePjr Artist Veteran

    Messages:
    533
    Likes Received:
    215
    Location:
    Texas USA
    First Language:
    English
    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: Dec 4, 2015
    #20

Share This Page