3 ms·
How JavaScript Beats GameMaker Language
- linkdd 5y agoI don't think JavaScript and GML can be compared as they are very different. For example: obj_ball.speed = 0 Will set the speed on every instance of obj_ball. So obj_ball is not a variable. And that's only one example of many. By the way, the author lists JavaScript features, but lists none of the GML features that are inexistant in JS (the with block pops into my head to switch context). Also, it's surprisingly easy to write C++ code and integrate it with GML. For example all the ds_* functions (for maps, lists, etc...) are native and not pure-GML. So if you need the perf, you can have it. Finally, the example of prime calculation is a bit biased. It relies on the SQRT function, and according to its implementation it can be really slow. Which is why in GameDev, we usually work with squared values (same properties) and avoid calls to SQRT as much as possible. On a side note, first version of Game Maker was from 1999, EcmaScript 1 was only 2 years old and far from performant at that time.