It's a VN called Tsukihime. Melty blood was a spin-off of Tsukihime which was made by Type Moon. The anime was also based on the game, but when they made the anime for some reason they took out or dumbed down everything that made the game so great such as the characters and all the backstory.