Depends on how you want to turn this trip into. if you are interested in History , Hikings , Hunt for sunrise and sunset spots then head to Hampi . Interested in Beach trek , Relaxing in beach, then it would be Gokarna . My suggestion , Dont miss both :)
You can actually cover both Gokarna and Hampi.. but if you ask me,
Hampi for its amazing architecture and secludedness plus a serene hippie life
Gokarna for beaches, greenery and party cum hippie life :P
Hi friend , I never been to Gokerna but I been to hampi and its amazing . If you are a serious traveller then Hampi is the best choice , no need to think twice .