So long as personal information is not collected, consent is not morally necessary.
If I collect information on how often a coin-op Street Fighter II game is played in an arcade, while collecting no personal information, consent is not needed.
You are not entitled to play the game, which is hosted on their server which requires bandwidth and other resources. In the same way that you are free to make demands about how software runs on your machine, the author is free to make demands about the use of their software.
If the data gathered is only on gameplay, and not something that can be used as PII like IP addresses or device information, then it should be fine. Gathering things like the score and time spent completing the level, isn't a problem. This could be used to rank the levels, without gathering any user information.
There are games that let you opt-out, hell even ones that ask you when you first open the game. There are bad apples, but there are plenty of good ones too.
If it asks you then it's neither opt-in nor opt-out. Then it depends on how it asks you. If it's a simple yes/no, it's fine. If it's typical tech bullshit where your options are a big "I want to make the world a better place and save the whales by sending my data" or a tiny button in the corner labeled "maybe later" that takes you to another screen saying "please confirm you want to opt out of data collection and kill a bunch of kittens" then not so good.
If I collect information on how often a coin-op Street Fighter II game is played in an arcade, while collecting no personal information, consent is not needed.