I actually took the concept from the Pokemon sliding puzzles. So I'll have to check out Undertale as well, maybe it has some other cool mechanics I can take inspiration from?
Thank you, I'm indeed considering to make it into a complete mobile game.