You can be inspired by a game without using its sprites, music or mechanics... You can change names and so on... Several developers where inspired by other games without breaking IP.