Game Maker vs web development code comparison

I’d like to note a few differences in the coding styles between web development and game development. My background comes from a Full-stack engineering perspective and I’ve been getting into Game Maker lately.

Variable naming

In web development it’s almost always useful to have explicit variable names, for instance in Javascript this is acceptable:


This isn’t prohibited but not recommended, because it’s harder to search for:


And when going into Game Maker Studio, it’s really common to have instances of:

vsp = 3;
hsp = 5;
xx = 10;
yy = 5;
btn_pressed = false;

What’s interesting to me is that the video game development community widely doesn’t adopt standard coding practices from other industries. By the way I’ve adapted to writing code differently in Game Maker, because the engine itself has it’s own constraints and to be practical an move forward with development. I still try to have a clean codebase but I work with the engine’s advantages, which is that it’s simple and you can ship a full video game fast.

Unit testing

In web development, unit testing has to be present, otherwise you’re missing out in how easy it will be to maintain your project even a few months after you start.

In Game Maker, and even Unity, unit tests are both not common and hard to implement and maintain. In Game Maker you have to come up with your own framework or way of testing the functionality of your game.

Thoughts on this

In the end, I went with adapting myself to each different industry and enjoying the benefits of each practice. I’ve come to understand that videogame codebases sometimes don’t live for a long time. A game can be developed in 2 years and after that, the codebase that was used will most likely not be maintained by anyone, so that’s a big difference between videogames and web development. On the oher hand, in web development you’ll have to maintain the same codebase for decades to come, so it makes sense to strive for test coverage in order to prevent breaking some parts of the web app unintendedly.

Leave a comment

Your email address will not be published. Required fields are marked *