  With the continuous growth of the internet market, games are becoming more
and more popular worldwide. However, increased market competition for game
demands developers to write more efficient games in terms of performance,
security, and maintenance. The continuous evolution of software systems and its
increasing complexity may result in bad design decisions. Researchers analyzed
the cognitive, behavioral and social effects of games. Also, gameplay and game
mechanics have been a research area to enhance game playing, but to the extent
of our knowledge, there hardly exists any research work that studies the bad
coding practices in game development. Hence, through our study, we try to
analyze and identify the presence of bad coding practices called code smells
that may cause quality issues in games. To accomplish this, we created a
dataset of 361 web games written in JavaScript. On this dataset, we run a
JavaScript code smell detection tool JSNose to find the occurrence and
distribution of code smell in web games. Further, we did a manual study on 9
web games to find violation of existing game programming patterns. Our results
show that existing tools are mostly language-specific and are not enough in the
context of games as they were not able to detect the anti-patterns or bad
coding practices that are game-specific, motivating the need of game-specific
code smell detection tools.
