9 votes

Lost in Development

The next step would be to secure a budget of several million dollar to hire a team of a few hundred experienced people, because that's what it would take to create the greatest game ever. Do you have ...
Philipp's user avatar
  • 118k
6 votes
Accepted

How to check if all switch objects in a room are set to true?

If my GML is not too rusty, the following should work: ...
Quentin's user avatar
  • 1,168
5 votes
Accepted

What's the difference between variables defined with and without the 'var' keyword?

Variables declared with the var keyword are local variables, whereas variables declared without var are instance variables. More ...
KevLoughrey's user avatar
5 votes

How do I scale up pixel art without blur in GM Studio?

Nobody wants to deal with having to manually scale up every sprite; not only is it a sloppy workspace but it yields to be very unprofessional. I found a solution when turning off interpolation in ...
Toby Jeffry Staryth's user avatar
5 votes

In GameMaker, is it possible for users to code something into a game while playing, and verify that it is correct?

What you're describing is effectively running gameplay mechanics in a virtual machine, which can simplify the process of authoring them and insulate against bad behaviour. As it happens, a lot of ...
DMGregory's user avatar
  • 132k
5 votes
Accepted

Score over time

You can do this with a timer like this: In your Create event (or where you want to start your counting): alarm[0] = 1; Then in your Alarm 0 event: ...
Jeggy's user avatar
  • 166
5 votes

Why are the randomly generated numbers not random?

This is intended: NOTE: This function will return the same value every time the game is run afresh due to the fact that GameMaker: Studio generates the same initial random seed every time to ...
TheCell's user avatar
  • 93
4 votes

game maker place_meeting multiple objects

You will get into all sorts of problems with complex if statements. Here is the solution I use, and it works for any number of grounds. Define an object obj_ground....
Andrew Shaw's user avatar
4 votes
Accepted

In GameMaker how to check if instance is a given object?

object_index This read only variable returns the index of the object that the instance has been created from. So your code would read: ...
Quentin's user avatar
  • 1,168
4 votes

Jump function moves object horizontal after dash function

I would recommend trying to clean up and reduce the number of variables you are keeping track of, as more bugs are likely to develop. But on to your question: The problem you are seeing is that ...
LAMonday's user avatar
4 votes
Accepted

In Gamemaker Studio 2 how can I find out in code whether the platform is HTML5 or not?

You can check what browser the game is currently being run in with the os_browser constant. If the game is not being run in a browser the constant will be ...
Charanor's user avatar
  • 7,800
4 votes

Jumping to land x pixels ahead while not really moving (2D)

If your ground scrolls at groundSpeed = 240 // pixels per second And you want your jump to cover ...
DMGregory's user avatar
  • 132k
4 votes
Accepted

Game Make Studio 2 - Grid snap x, snap y

There are some icons at the right bottom area of the room editor. Check the first one of them:
Dmi7ry's user avatar
  • 1,050
4 votes

How to model chess knight movement in GameMaker?

Borrowing the diagram from disc_code22's answer, let's overlay it with some numbers. For each square, we're going to count how many squares it is left or right from the knight, and square it; then do ...
DMGregory's user avatar
  • 132k
3 votes
Accepted

How to randomly spawn objects off-screen close to the player?

I don't know the expected limits of your coordinates so I made them constant-like (i.e. screenLeftX). My snippet chooses a random edge of the screen and then a random value between the appropriate ...
Jon's user avatar
  • 3,684
3 votes
Accepted

Darkness, and a candle

Assuming the camera follows the character, you should be able to use an image to black out all of the screen except around the character. If your game window is 800x600 for example, create a fully-...
Peter's user avatar
  • 113
3 votes
Accepted

A guide on multi-direction and multi-animation sprites?

Make a new sprite, go to Edit Sprite then File→Create From Stripe... Pick your sprite sheet then it will show it with a grid. From there you can set number of images and images per row so that ...
Martin's user avatar
  • 166
3 votes

Gamemaker - Maintain relative position between objects during rotation

I don't know about GameMaker, but usually you need to rotate second object with an angle of the first one like this: ...
madneon's user avatar
  • 295
3 votes
Accepted

The Power of 2D Engines vs Modern 3D Games

The bottleneck for games is usually the bandwidth and latency between cpu and gpu, not the number of calculations you're doing. Using your example of 3,000 sprites, the reason it's so slow is because ...
Icy Defiance's user avatar
  • 1,257
3 votes

In Game Maker, how do I make invisible platforms the player can walk on, and reveal with an item?

Looking at the pieces one by one: Invisible floor You can make invisible floor tiles by choosing your usual floor image as the collision mask, and setting the object to have no sprite. Partially ...
Anko's user avatar
  • 13.4k
3 votes
Accepted

Does each game asset always require a prefix such as 'spr' or 'obj' in their name?

No, this is just a coding convention on the part of the people who wrote the code. You can name your objects however you want (within reason... I'm sure $@#$ would ...
Almo's user avatar
  • 6,678
3 votes
Accepted

How to fix an alarm event not triggering? [Gamemaker studio]

The alarm needs to be on the same object. When invoking alarm it's reading the local alarms, you would need to do ...
DH.'s user avatar
  • 551
3 votes

Why does my variable seem to be non-existent in GameMaker?

In the very first code of yours, you wrote: Target= instance_find(ENEMMY,i) But that's not correct, since your enemy objects are named ...
liggiorgio's user avatar
  • 4,597
3 votes

Is there a way to set a range on a case argument in a switch statement in Game Maker: Studio?

You should use if: ...
Dmi7ry's user avatar
  • 1,050
3 votes

How to clear the scores?

Just set an event which triggers the following GML code: // Clears current lives and score lives = 0; score = 0; That's it.
liggiorgio's user avatar
  • 4,597
3 votes

Stuck space invaders

I'm trying to run the code through in my head, so my apologies here. Could it possibly be that roughly 2/3 of the way down the screen, that the move_speed happens such that you can't get to a ...
derstander's user avatar
3 votes

How to make compound data in Game Maker?

Because I don't have enough reputation to comment, I'm submitting an answer that further clarifies the previous answer regarding ds_map. Here's an example of ds_map in action: ...
derstander's user avatar
3 votes
Accepted

Programmatically creating a continuous scrolling background in Game Maker: Studio

To dynamically scroll through a very large background made up of smaller frames, there are many different solution; the main idea though is quite the same. The main idea Think of your fifteen ...
liggiorgio's user avatar
  • 4,597
3 votes
Accepted

How do I check if an item no longer exists in GameMaker Studio?

It seems you have to use instance_exists(object) to check if the object has been deleted or not. This will return false when the ...
Charanor's user avatar
  • 7,800

Only top scored, non community-wiki answers of a minimum length are eligible