Anime comes from a variety of source materials. Most people think of manga as being the main source for most mainstream anime, while others recognize the contributions of light novels and visual novels to the medium as well. Even history or classical literature. This means that, of course, there are plenty of famous anime based on video games. The mediums have a lot in common and video games lend themselves particularly well to anime. Some anime have tie-in games and even more have managed to make something of a multimedia experience out of the combination of the two like the .hack series.
Source:https://www.cbr.com/rpg-maker-inspired-anime/