Introducing Dragonfly Cloud! Learn More

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?

White Paper

Free System Design on AWS E-Book

Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.

Free System Design on AWS E-Book

Start building today 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.