Playing the ‘what is art’ game is ontological silliness, and expecting that there exists a definitive answer a form of madness. Even so I think you are confusing ‘art’ and ‘artform’ here. I agree that the element of competition is not the relevant factor, but that doesn’t make your example art. There are lots of things that make up part of the practice of being a dancer (and hence the artform)—rehearsals, attending classes—that are necessary, and even form the majority of what you do, that aren’t art, just things you need to do to make it.
They might not even be that - I do the same things if I attend for class for fun or exercise, as if I attend it part of the practice of being a dancer—and there is nothing to distinguish the two—but I am vehement in insisting the doing the former does not make me the latter. I am not making dance so I am not a dancer: more widely it (being a dancer, being an artist) is something you do, not something you are. (By way of explanation I studied dance full time at one point and did make dance so it was true at one time).
If I were to make dance again asking ‘is is art’ is asking the wrong question. The question I should ask myself is: Does it work? This is necessarily contingent and dependent on the individual piece I made—with dance the answer might even vary from one night to the next. The answer can be no, of course. There is lots of bad art out there, but it doesn’t stop being art because its bad.
So in the case of our theoretical audition/competition asking ‘Did it work?’ is asking ‘Did you get the part?’, which is clearly a different purpose than whatever nominal purpose we wish to ascribe to ‘art’.
This has some bearing on the question of whether video games can be art, or rather the questions we might need to ask. One of the reasons I would insist on asking does it work, not is it art is that the latter tends to rest on an unspoken assumption that art is somehow special or set apart without providing a justification for why this should be so. That it turn lends it to a similar valorization of the role of ‘artist’, especially, as something that is somehow distinct from their work. I once read a very cutting critique of Joseph Beuy’s statement that "Everybody is an Artist’. While seemingly radical and democratic, it conceals something that is the opposite. As the writer put it: we all take the trash out at some point but nobody says ‘Everybody is a Garbage Collector’, why is that?
So firstly we might want to be cautious about why people ask the question, and wonder who stands to gain what from it? Secondly we should pose the question how does it function. In the case of video games how they function as games is central. Unrelated to art but know less important for it. We can’t also point to quality as an indicator (bad art is still art). Rather we should ask can it function in ways that we recognise as having a family resemblance to the ways in which things we recognise as art work.
The answer to this is certainly yes, though that hardly answers the question in terms of games as a category. This not something I think can necessarily be answered, nor it is one I an convinced we should really care about. Where it does become relevant, after all, is mostly for purposes that only superficially concern themselves with art (for arts sake) - prestige, eligibility for grant funding etc, etc.
If we want to concern ourselves with Video games (or code, or any other novel medium) as art the only real way to get at an answer is to make work and ask of it the question ‘Does it work?’.