I was playing a game and a little boy said, おにいさん. I was wondering why it was written in hiragana? Is it because the boy wasn't my brother, so putting it in hiragana changes the meaning?
No, there is no such rule that お兄さん and おにいさん refer to different things.
Usually, there is no strong reason to write this word with kanji or in all-hiragana. Both お兄さん and おにいさん are perfectly natural ways to write this word, and there is little difference. See: Why is 私 a sixth grade kanji?
However, all hiragana words can sometimes give a slightly mild, friendly or childlike impression. If the speaker is a friendly little boy, this fact may increase the likelihood of おにいさん a bit. See: What does it mean for the 'feel' of a sentence / text when it's written in all hiragana? and Why is the place's official name written as "なら工藝館" (rather than "奈良工藝館")?.
In addition to linguistic reasons, if you're playing an older game (especially something on, say, an 8-bit console) then there were often technical reasons for not using many, if any, kanji. Storing the font for the English alphabet on a cartridge doesn't take up too much space because there are only 36 alphanumeric characters plus however much punctuation you're using. Storing a full set of hiragana or katakana requires more than 50 characters depending on how you manage the diacritics and half-size characters. Storing a half-way decent amount of kanji might require hundreds of characters, which starts eating heavily into space that could contain more actual game content.
Additionally, it's usually not too hard to make kana readable in an 8x8 pixel box, but any half-way complicated kanji is likely to become an entire mess. Look at the discussion in this question for an example of how overly-pixellated kanji are undesirable.