What's the template for auto tiling?

E

Ealonex

Guest
When I tried to autotile with any and all suggestions on doing so, they never come out properly. This is an example of one of my autotiles (64x64). What's the correct size for auto tiles?
Edit:
Ah, and I'm trying to make my character automatically go infront and behind trees and such. No idea how to make it work right.
 

Attachments

Nocturne

Friendly Tyrant
Forum Staff
Admin
There is no "correct" way to autotile. The images you use will depend on the tile script that you are calling. For example, the one I have on the Marketplace uses 47 tiles (48 if you include the "empty" tile). But I've seen some that use 9 and 16...

As for the in front and behind thing, set the tree depth in the create event to:

Code:
depth = -bbox_bottom;
Then place the same code in the Player step event. ;)
 
E

Ealonex

Guest
There is no "correct" way to autotile. The images you use will depend on the tile script that you are calling. For example, the one I have on the Marketplace uses 47 tiles (48 if you include the "empty" tile). But I've seen some that use 9 and 16...

As for the in front and behind thing, set the tree depth in the create event to:

Code:
depth = -bbox_bottom;
Then place the same code in the Player step event. ;)
Ahhh thank you so much for the depth issue!
So for an RPG game, how many would I even need? I sometimes feel like I'm missing a part even though I also have this other one version that actually works better. It's frustrating because I see all these other games with seemless tiles and they seem to have corner pieces or individual pieces that I don't have (like one grass in the middle of dirt)
 

Attachments

E

Ealonex

Guest
Last edited by a moderator:

Zodaris

Member
For that picture you posted, the black edges are the open sides. Meaning 0 is a lone block, 1 is hanging below another block by itself, etc. The method for how to apply that tileset is in the link Nocturne gave you: http://blog.cowboycolor.com/binary-auto-tiling-in-game-maker/
For an RPG though, I'd suggest putting the code in the create event instead of the step like what that guy did for his game.

The video Nocturne shared is one that I personally love and use. It takes 47 tiles (48 is you count the blank empty space one). Links are in the description for that video. Download the tileset template to guide your tileset making, and the script is also downloadable. Just "plug and chug" as my math teachers used to say.
 
I

icuurd12b42

Guest
with the image you posted a tile looks up the size of a tile, if a tile is there you add 1 to the count
you look right, you add 2
you look below, you add 4
you look left you add 8

if you have a tile up and right that is 1+2 = 3 that give tile 3
if you have a tile left and down that give 2+4 = 6....
if you have atile right and up, 8+1 = 9
each tile does this and they change their image according to their surrounding.

room_start, tile_obj.
image_index = 0;
image_index += (collision_point(x, y-16, tile_obj,0,1)!=noone)*1;
image_index += (collision_point(x+16, y, tile_obj,0,1)!=noone)*2;
image_index += (collision_point(x, y+16, tile_obj,0,1)!=noone)*4;
image_index += (collision_point(x-16 , y, tile_obj,0,1)!=noone)*8;
 
E

Ealonex

Guest
with the image you posted a tile looks up the size of a tile, if a tile is there you add 1 to the count
you look right, you add 2
you look below, you add 4
you look left you add 8

if you have a tile up and right that is 1+2 = 3 that give tile 3
if you have a tile left and down that give 2+4 = 6....
if you have atile right and up, 8+1 = 9
each tile does this and they change their image according to their surrounding.

room_start, tile_obj.
image_index = 0;
image_index += (collision_point(x, y-16, tile_obj,0,1)!=noone)*1;
image_index += (collision_point(x+16, y, tile_obj,0,1)!=noone)*2;
image_index += (collision_point(x, y+16, tile_obj,0,1)!=noone)*4;
image_index += (collision_point(x-16 , y, tile_obj,0,1)!=noone)*8;
I tried this and got this:

I also got that last time too, so i gave up on it for a little bit. The tiles above were placed normally btw.
For that picture you posted, the black edges are the open sides. Meaning 0 is a lone block, 1 is hanging below another block by itself, etc. The method for how to apply that tileset is in the link Nocturne gave you: http://blog.cowboycolor.com/binary-auto-tiling-in-game-maker/
For an RPG though, I'd suggest putting the code in the create event instead of the step like what that guy did for his game.

The video Nocturne shared is one that I personally love and use. It takes 47 tiles (48 is you count the blank empty space one). Links are in the description for that video. Download the tileset template to guide your tileset making, and the script is also downloadable. Just "plug and chug" as my math teachers used to say.
But do RPG games need 47 wholes sprites? I'm working on a project for myself and I wouldn't call it the smallest thing ever. I think the only reason I wouldn't try this one just yet would be 1: It for some reason doesn't work for me and me specifically (and this happens alot), so I'll feel so burnt out on spending so much time on 47 little pictures. Two, I don't know of any rpg game that uses this method either? I'm not sure how the game looks like with so many sprite (presumptuously better but I need to be able to actually see that first.)
 

Zodaris

Member
But do RPG games need 47 wholes sprites? I'm working on a project for myself and I wouldn't call it the smallest thing ever. I think the only reason I wouldn't try this one just yet would be 1: It for some reason doesn't work for me and me specifically (and this happens alot), so I'll feel so burnt out on spending so much time on 47 little pictures. Two, I don't know of any rpg game that uses this method either? I'm not sure how the game looks like with so many sprite (presumptuously better but I need to be able to actually see that first.)
Depends on the art style you're going with. If you're going for very simple, then 16 will be fine. But for anything RPG Maker level and better, I'd say 47. For most tiles, it's not too bad to make that many. You just make the base tile (the one that is in the middle). Make 47 copies, then just go through erasing the correct edges on each one. Maybe touch it up a bit here and there. Takes no more than a few hours per set (maybe shorter, I had a bunch of unique walls when I did it last so a few hours for me.) and it's actually quite relaxing once you get going. Picking a favorite podcast to listen to while you do it could be helpful.

Also, for an RPG I wonder if you even need auto-tiling. Here is a great resource for making maps with tiles if that's all you need: Tiled
 
E

Ealonex

Guest
My code should work. you need the 16 tile version as per the image you posted.

BTW, A note to people who make tutorials. post a sampler tileset that effing makes sense. that image is not tileset extractable. I spend more time fixing it than anything else

https://www.dropbox.com/s/ef4hnaetmndso51/autotile.gmz?dl=1
Okay so I saw that project and damm, I get it now. I will very likely make tilesets this way for the time being.
Depends on the art style you're going with. If you're going for very simple, then 16 will be fine. But for anything RPG Maker level and better, I'd say 47. For most tiles, it's not too bad to make that many. You just make the base tile (the one that is in the middle). Make 47 copies, then just go through erasing the correct edges on each one. Maybe touch it up a bit here and there. Takes no more than a few hours per set (maybe shorter, I had a bunch of unique walls when I did it last so a few hours for me.) and it's actually quite relaxing once you get going. Picking a favorite podcast to listen to while you do it could be helpful.

Also, for an RPG I wonder if you even need auto-tiling. Here is a great resource for making maps with tiles if that's all you need: Tiled
actually yea I can totally see it being relaxing. I just dont want to spend hours drawing it in the wrong format so can I have a picture template to look at please? like the 0-15 green blocks from the tutorial. Sidenote, I don't actually see rpg maker games with 47 tiles tileset??? They'd look pretty good I assume tho. Shaun spalding's tileset thing does not look like it works with rpg games.
 
Top