Question: Which language does GameMaker use?
Answer
GameMaker Studio uses its own scripting language called GameMaker Language (GML). It's a C-like language designed to be user-friendly and easy to learn for beginners, but powerful enough to facilitate complex game development tasks for more experienced developers.
Here is a simple example of GML code that creates a moving object:
// Create event for an object speed = 5; direction = 0; // Step event for the same object if (keyboard_check(vk_right)) { direction = 0; } else if (keyboard_check(vk_left)) { direction = 180; } x += lengthdir_x(speed, direction); y += lengthdir_y(speed, direction);
This code would typically be placed in an Object's events within GameMaker. The Create
event initializes the object's speed and direction. In the Step
event, it checks for keyboard input and updates the object's position accordingly with the lengthdir_x
and lengthdir_y
functions which calculate the horizontal and vertical components of movement based on the direction and speed.
For interfacing with the engine, GML provides a wide range of built-in functions and variables to manipulate graphics, sounds, input, physics, and much more, allowing creators to focus on their game logic without worrying too much about low-level programming concepts.
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 C++?
- 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?
- Is Unreal Engine Good for Beginners?
- Does Unreal Engine Work on Mac?
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