Jump to content
UncannyBoots

Mirroring tiles via Tile Swap script

Recommended Posts

Posted (edited)

I want to use as few tilesets as possible. So far I'm still at only 2 different tilesets for my entire game; one for indoors, and one for outdoors. I'm reaching the limit though, and I want to make some unique buildings, which are going to be pretty big. And here lies the problem: the buildings are symmetrical, so it uses double the tiles on my tileset, but it doesn't have to. If I could mirror the tiles that are symmetrical, which most retro games do, I could cut the tileset usage in half for these building tiles.

Now, I found this script by Hime that allows for inserting tiles via script call. I know that it is possible to mirror bitmap images in RGSS3, because I have a script by Galv that has a mirror reflection in water that mirrors the character sprite on the y axis. So I think that, in theory, a modification could be made to Hime's script here that would insert tiles on the map, but mirrored on the x axis. I'm not a scripter though, so I came here to ask for your thoughts.

 

Do you think this is feasible, and if it is, could you do it for me? It takes some humility to ask that lol, but I'm not just asking for "help" here because I don't know what to do at all when it comes to writing Ruby, so to be frank I am asking for someone to do it, if it's not too much of a hassle. It's a decently long script so I don't know how many variables would have to be edited. If it is too difficult, then I understand. Thank you 😖

EDIT: Looking into it, the way that Galv's Character Effects script mirrors the player sprite is by using "self.mirror". I wonder if that sort of code would work for tiles too. I kind of doubt it though ☹️ Would something have to be added under Spriteset_Map?

Edited by UncannyBoots

Share this post


Link to post
Share on other sites
25 minutes ago, PhoenixSoul said:

self.mirror is a reference to whatever the base is, so event.mirror or player.mirror would be the most common result.

Hmmm...going for a smaller game size?

Yeah and it's easier to have only two tilesets so I don't get confused and change a passability in the wrong tileset, which I would do all the time when I had many tilesets that shared the same A or B-E tiles. But in general I do want my game to have as few files as possible too

Share this post


Link to post
Share on other sites

Okay first of all: Remember that anything you do will not show up in the editor. No matter how clever you are with figuring out how to reuse tiles it won't matter unless it's actually practical to make maps. Unless you want to make your own map editor, don't bother.

 

Also, most retro games use the concept of 'metatiles', aka tiles that are made up of smaller tiles which can be mirrored or reused to save space. Is this possible to do this in RPG Maker? Well... Yeah. You can basically use any image you want as a tileset and draw to it anytime you want. But you won't really be saving tiles this way. If you have one normal metatile and one mirrored metatile, you might be able to reduce the graphics space it takes, but it's still two metatiles.

 

So yeah, over all? I would say it's way more trouble then it's worth. If you are trying to mirror tiles anyway. Mirroring backgrounds/images is way easier.

Share this post


Link to post
Share on other sites

I hate doing parallax mapping and afaik there's no way to anchor an image onto the map so I just gave up on this dream. Instead, for big unique buildings that I only use on one map, I just put the building in a character sheet and piece it all together with events.

Thanks for the response

Share this post


Link to post
Share on other sites

People usually use scripts for that I think. I think using events is actually a pretty good idea honestly! Parallax mapping tends to lead to big bloated images anyway.

Edited by Kayzee

Share this post


Link to post
Share on other sites

Yep, they certainly do. Remember the 'default' map images from Tsukuru 3 for PSX? Some of those are very large, at 50*50 tiles or larger, with the tilesize being 24^2 pixels...that's a very large image...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×