Solarus Forum

Solarus => Bugs & Feature requests => Topic started by: b0undarybreaker on July 13, 2017, 10:00:48 am

Title: More tile ground types
Post by: b0undarybreaker on July 13, 2017, 10:00:48 am
I'm making a road in my project and I want the sides of the road to be half-traversible, half-wall. However, the only half-traversible tile grounds are corners and low wall. I want something like low wall, but for the top, left, and right as well. Would that be possible to do, and do you think it might be possible to be able to make custom tile hitboxes in the engine as well? It'd be really neat to be able to craft your own ground types by polygon out of the basic types.
Title: Re: More tile ground types
Post by: Diarandor on July 13, 2017, 10:12:24 am
I don't understand why the "low wall" ground does not fit for your purposes. (It should, or I don't understand your problem.) Could you explain why?
Title: Re: More tile ground types
Post by: Diarandor on July 13, 2017, 10:48:09 am
Or maybe you mean that you want diagonal low walls? Because if that is the case, you are right, there is no such type of ground type.
Title: Re: More tile ground types
Post by: b0undarybreaker on July 14, 2017, 10:06:39 am
Low walls are exactly what I want, but there's just a problem with them: there are only low walls in one direction. I can't have them covering just the left half of the tile or just the right half of the tile, only covering just the bottom half.
Title: Re: More tile ground types
Post by: b0undarybreaker on July 14, 2017, 12:43:15 pm
I'm splitting the ones I want to have as partial traversible tiles into separate tiles, but it takes the number of total tiles from 48 to 84, and it makes things excessively complex if I decide I want to move things around. For reference, I've attached images a map using the tiles and the tilesheet itself, with tile hitboxes shown. Optimally, each tile would just be a square, with specific terrain that dictates what parts of the tiles can be walked on, instead of having to split each full tile into smaller pieces to do it.
Title: Re: More tile ground types
Post by: Diarandor on July 14, 2017, 10:20:07 pm
You should not use the expression "direction of a tile" because it makes no sense, as a technical term I mean. Low walls have no direction property (except for repeating them, which is a different thing), so I don't understand what you meant with "I want something like low wall, but for the top, left, and right as well." The term "low" in "low wall" does not refer to the down part of the tile (for the Y axis), but it means below (for the Z axis), and the main purpose of "low walls" is to allow to throw things over them (like arrows and other stuff, but I guess you know all of this).

If you want a 16x16 tile that is traversable on the left side and low wall on the right side, then you should split it as two different tiles. Splitting tiles into smaller ones that have different ground type, as you are now doing, is the correct way to do it, so there is no problem to solve. I think that Solarus v1.6 will have options to lock/fix tiles/entities to the map and to group tiles/entities together, which may be useful to move groups of tiles/entities withouth breaking things too much.
Title: Re: More tile ground types
Post by: b0undarybreaker on July 15, 2017, 09:50:47 am
Ohhhhhhhh. Okay. The look of the tile preview to be half-wall and half-terrain confused me. Sorry!
Title: Re: More tile ground types
Post by: Diarandor on July 15, 2017, 11:24:43 am
Yeah, I guessed that you were confused by that image. And I think that the Lua API does not explain what is each type of ground, which makes it hard to guess what are "low wall" grounds. No problem!  :)