So Im a pretty introverted person, but when I moved out to study about a year ago I initially met a lot of new people. Mostly at parties and other social events arranged for students to get to know each other. However after these initial social events when the semester started, I saw a lot of people at campus that I had previously spoken with briefly but hadn't made a strong connection with either. A lot of the time I was unsure whether or not to say hi when I saw them, and many times it ended with me just awkwardly avoiding them. I found that if you see someone you've talked to before with saying hi when you see them, it gets very hard to make friends with them later. Sometimes I also experienced people I had talked to just walking straight past me like I was a ghost. The whole thing affected me a lot and I ended up spending most of the year in my apartment avoiding going to campus if possible.
I also find it difficult to know how to react in situations where you see someone but they're too far away for you to say hi directly (verbally).
How do I deal with these kinds of situations?