JavaScript VS GameMaker Language


JavaScript VS GameMaker Language

Earlier this month Scirra put out an article, comparing the performance of JavaScript, GameMaker Language(GML), Construct 3’s Event Blocks, and GML’s VM(which acts as an interpreter) when it comes to running a fairly basic set of calculations. I’m going to keep this article fairly short, as Scirra already has a well written article covering their tests, which I will link to at the end of this article as well.

Construct 3 runs on JavaScript, which is very similar to GML. GML is actually based off of JavaScript, and runs on it as well, but GameMaker runs things through this unique proprietary language. In one of the images below and in the article over at Scirra’s website, you can see how similar the scripting and terminology is between JavaScript and GML.

In Scirra’s tests they ran both GML cases(GML YYC & GML VM) using YoYo Game’s latest 64-bit version of the runner/compiler at the time, which performs better than the 32-bit version of the application. As with almost all 32-bit vs 64-bit apps on a 64-bit processor, of which most processors are 64-bit these days. I believe the last 32-bit processor was made back in 2010 or 2011. Though they can still be found in embedded systems, such as the Quark processor used to boot up Intel motherboards, among other things like checking the RAM, WoL(Wake on Lan) signals, keyboard/mouse interrupts, etc.

Anyways down to the brass tacks. At the end of the testing they found that JavaScript is far faster than GML in their test. And, the GML VM is much slower(by over 40x). If you have a GMS subscription and use the YYC to compile the project to native code, it will still be 5x slower to perform the calculation used in this performance test. The test was to see how long it took each version to count how many prime numbers there are, between 1 million and 2 million.

Bottom line is, JavaScript and GML are very similar as far as difficulty in learning curve. With GMS you are stuck using GML through their game engine, or of course use the spaghetti like drag n drop editor(which can become very confusing, very quickly, to locate different things in your work). With Construct 3, you have the option of using their Event Blocks(which is very quick performance wise), which in my opinion is much easier to quickly scan over with my eyes(it keeps events very tidy and clean), and use for game development compared to GMS’ drag n drop editor. Not only that, you can easily create custom JavaScript code for your games, and incorporate it with the Event Block editor as well.

So for me, Construct 3 is the winner. It’s far easier for me to use their drag n drop system, and is a great performer when it comes to running games efficiently. All of that, along with all of their updates, especially the recent 3D Objects and Functions, keeps the software growing by leaps and bounds(on a weekly/monthly basis). This allows anyone to enter the game design/development space quickly and easily. It will obviously take time and practice, and does have a learning curve, as does anything else. Especially if you are brand new to game design, and scripting/programming concepts in general.

This is not to say that GameMaker Studio is not a solid option for designing any style of game, and it also offers easy export options for any style of device, including video game consoles such as PlayStation, Xbox, and Switch. With Construct you can work with a publishing company to have your game ported to consoles, if that’s something you want to do(so console development is not completely out of site with Construct). I still use GMS and Construct side by side, and have been testing the two for various game designs. But, I’m starting to lean more and more in the direction of focusing solely on Construct for all future projects. Now that YoYo Games has moved to a subscription based model for GameMaker Studio I’m sure they will be making some large improvements to their tools as well.

With all of that said, here is a link to the original article over at Scirra’s main website:

It is a great read for anyone interested in learning the performance differences between to the two applications. Here are a couple of images from the article as well. The top one shows how similar JavaScript and GML are(notice how close the command, and lines of script are). The bottom one shows a break down from the performance test, with the results in a bar style graph.

GML Compared to JavaScript
Performance Test Breakdown

About Colin

Check out ColinLitchfield.Com

My other website is located at where I offer tips and tricks, motivational posts, how to guides, and training classes on game design & development.

Recent Posts