NOT TYPICAL STORY about a guy ignoring me.

This year, I became even closer to my guy friend, "Bob." We would chat every night and talk to each other all the time in English. Everything we chatted about was personal, secretive stuff. I even considered him one of my best friends. Eventually he got chosen as the homecoming prince, and he needed a date. [random, irrelevant stuff happens]. He eventually doesn't find a date and goes to the dance stag. However, the day after the dance, he stops talking to me. He's polite in the hallways and on chat (which I have to initiate first), but that's it. I know nothing special happened for him at homecomimg (his friends told me), and I didn't change the way I acted. I did find out that he was going to ask me to HC and planned something out, but didn't because everyone told him not to. This might also explain why before homecoming he told me he thought I was really popular and he was just a nerd. Apparently, he let someone else ask me instead because he didn't want to anymore. And he also now knows I know he was going to ask me. But the moment that he stopped talking to me happened before he found out. Help?