if it's just pressing a button that signifies a "spell" on a keyboard or controller, and the character throws (for example) a fireball it's ok. for me. But if the character begins to recite a spell or summons a demon, then I would refuse to play or see that. The fireball is fantasy, it has nothing to do with real sorcery, but the other thing is like real sorcery.
On the other hand, most gamers sin against temperance. If you play 2 or 3 hours a week you are not doing anything wrong, but if you play 40 hours a week (as incredible as it may seem there are people who play video games 40 or even more hours a week) and you neglect your obligations then you are sinning. Personally, I prefer traditional games like table tennis or table football. But when I cannot access them, because there are no people available, there isn't money or you cannot go because we are in quarantine or they ask for Green Pass, then video games are a substitute for me. They are very cheap in terms of cost per hour and can be played at home. But I play 2-3 hours a week, I'm not an ICEL who spends all day playing in his mother's basement, the problem is that this last profile is too common, and that can't be ignored when it comes to talk about this topic.
There are also games that are inherently sinful, like games that contain sɛҳuąƖ immorality or blasphemy.
Violence in games, if I'm not mistaken, is not necessarily a sin because it isn't real violence, nobody is suffering, unless the game recreates it and influences the player to recreate it, in which case they would be sinning due to bad thoughts. For example GTA. But violence like Mario, Zelda, a shooter that doesn't have blood or dismember body parts etc, which the violence is there but the game doesn't recreate it, it's not a sin for the average man.
A problem with video games is that they are very modern, the industry was developed in the 80s. So, just as the cinema became more and more immoral around that time, video games were born when this immorality was becoming more and more common.
At least I understand it that way.