Question: Does GameMaker use Python?
Answer
GameMaker Studio primarily uses its own scripting language called GameMaker Language (GML) for game development. GML is designed specifically for GameMaker and shares some similarities with languages like C and JavaScript, but it is not Python.
However, it's possible to use Python or other programming languages for certain tasks within a GameMaker project by using external libraries or DLLs and interfacing them with GML. This typically involves more advanced programming and an understanding of both GML and the external language being used.
For example, you might write a Python script that performs complex calculations or handles certain data processing tasks, then compile it into a DLL. You could then call this DLL from within your GameMaker project using GML with functions like external_define
and external_call
.
Here's a simplified example of how you might interface with a hypothetical Python DLL in GML:
// First, you define the external function var handle = external_define("MyPythonDLL.dll", "PythonFunction", dll_cdecl, ty_real, 2, ty_real, ty_real); // Then you call the external function var result = external_call(handle, argument0, argument1); // After you're done with the function, you free the handle external_free(handle);
In the hypothetical code above, "MyPythonDLL.dll"
is the compiled Python library, "PythonFunction"
is the function defined within the DLL, dll_cdecl
signifies the calling convention, ty_real
is the return type, and there are two arguments each of type ty_real
passed to the Python function.
Keep in mind that interfacing with external languages adds complexity to your project and should only be done when necessary or beneficial to your workflow.
Was this content helpful?
Other Common Game Engines Questions (and Answers)
- Can You Use C# in Unreal Engine?
- Is Unreal Engine Open Source?
- Can Unreal Engine make 2D games?
- Does Unreal Engine Use Python?
- What Language Does Unreal Engine Use?
- Does Unreal Engine Use JavaScript?
- Does Unreal Engine work on Linux?
- How Do I Uninstall Unreal Engine 5?
- Is Blender or Unreal Engine Better?
- Does Unreal Engine Work on Mac?
- Why Is Unreal Engine So Laggy?
- Can I Run Unreal Engine 5 Without a Graphics Card?
Free System Design on AWS E-Book
Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.
Switch & save up to 80%
Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement. Instantly experience up to a 25X boost in performance and 80% reduction in cost