- Home /
Better way for a tile based system
So I'm making a map for a game.
I currently have a system which uses something I call "sectors", each sector being a part of an image of a certain color. On top of the picture, I spawn landmark game objects (basically little icons with colliders attached and if while the player is touching them, you are considered "at" the location.
Later on, I'm going to need a way to recognize which sector you're in, which will be extremely tedious and annoying if all the sectors are in the same condensed picture. I also want to be able to make custom sector sizes.
I already have something in mind. My idea is to make a new rect with a tiled texture. For example:
Let's say one tile is equal to 1x1 (x and y). I could make a new rect of any size (e.g. 16 x 16), and it would just be covered by a texture that repeats 16x16 times over it.
Problem is, it never properly tiles over the object, and when the game starts it appears black.
Is there any simple way to have a texture tile over an object? First pic is example of what's already implemented, second is what I want to do.