Depends what kind of violence, and what the character means in the game.
Suppose it is a game like Grand Theft Auto. The main character gets money, cars, houses, and a lot of other stuff, by breaking the law. A game like that encourages children to commit violence.
However, if the game ends with the main character dying painfully or becoming unhappy, the player might, in turn, realize that this is not a good life. Games like these are good for children under stress, although there are much better methods.
It depends if the kids thinks it real. Littler kids are more impressionable, and are more pron to think that the games situation is real. But older kids are more likely not to commit crimes related to games. UNLESS they pressured by friends, or peers to do so. I also think that if you play hours on end...couple of days(me) you are more pron to do more rash things that you would if you were rested. Thats because the first thing that goes when your tired is your thought process. It slows down.
When I was 5, I got GTA VICE CITY and played it. It never harmed me but it depends on the child. Age doesn't matter, it's what the kid thinks so yes and no.