Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

There is a section about this in documentation - essentially GMLive has an implementation of a bytecode interpreter so it is always going to be slower than “native” code.

The only way to avoid such caveat would have been to compile and inject new bytecode into the game’s process, but this would increase the development and maintenance costs by more than order of magnitude, along with making the extension impossible to run on platforms where memory injection is harder/forbidden (mobile, console, web).

In particular, self-variable access is one of the fastest things in pure GML (as access is cached to the best ability), but has to use variable_instance_ functions in GMLive, which aren’t that fast. Assigning repeatedly reused instance variables into local variables helps with that.

There are also some issues with 2.3.x changes - e.g. I had recently noticed that try-catch is slower than you’d expect. You can experiment with setting gml_thread_allow_exceptions to true and adding a try-catch around the if (live_call line if you foresee code causing an error.

Thank you for the insight and fast reply!