Edge Walls on Tilemap
BlitzMax Forums/BlitzMax Programming/Edge Walls on Tilemap
| ||
I'm working on a tilemap game. I am kicking around the idea of having edge walls as well as full-tile walls. This would be a tile with three edge walls: |_| Any ideas about how to do this without tons of special cases? Should I make the edge walls be objects in the game world and handle them with the object collision algorithm rather than as collisions with the tilemap? They will have thickness. Perhaps that's the best solution? If I generalize it into rectangular collidable obstacles I could have things like rectangular pillars of various sizes, weird objects made up of rectangles, etc. |
| ||
Just use 3 collision rectangles to make your three walls. |
| ||
Right I know that. I was just wondering whether there was a canonical way to do it with tilemaps but I can't really think of a good way. I should be able to use collision rectangles with binning and that will be just fine. |
| ||
I would just hold all of your tile collisions in a separate layer. Then you can specify which type of collision you want: full box, left, right, top, etc. |
| ||
maybe this can be moved to "Beginners Area" just to not mix 2 different areas |
| ||
The reason I ask is that this used to be done with numerous different tile types, one for each possible configuration of four walls. I guess nowadays it's much easier to do it with obstacle rectangles in a list, or perhaps there is some better way-- my guess is that with binning the collision rectangles will work. |