I'm making a 2D sandbox game in C# and MonoGame, and I have a couple of tile sprites. These tile are loaded in-game as Texture2D
s. I want to have blocks visually connect to adjacent blocks.
An example:
This is how a tile would look if it was connected to another tile to its right side:
Here's if all of its sides were connected:
If none of its sides were connected at all:
I think you see the idea. Starbound and Terraria do a similar thing.
I don't want to have like 10 different textures for each block for every combination of every side, as that needlessly takes up space.
What can I do in the code to edit my existing sprites to look like this? Am I just better off going with 10 different textures? Or maybe there's something better I've missed?