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 ...
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:
...
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 ...
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 ...
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 ...
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:
...
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 ...
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....
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:
...
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 ...
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 ...
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
...
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:
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 ...
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 ...
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-...
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 ...
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:
...
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 ...
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 ...
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♦
- 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 ...
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 ...
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:
...
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.
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 ...
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:
...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
game-maker × 436collision-detection × 21
game-maker-studio-2 × 20
sprites × 18
android × 15
movement × 14
physics × 13
platformer × 13
2d × 11
camera × 11
game-design × 10
random × 10
software-engineering × 9
windows × 8
mathematics × 7
rendering × 7
glsl × 6
networking × 6
data-structure × 6
timer × 6
path × 6
shaders × 5
architecture × 5
ai × 5
game-mechanics × 5