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
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
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
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
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
3
votes
Accepted
How do I access device camera in GameMaker Studio 1.4?
GameMaker doesn't have native support for device cameras, that's the reason you didn't find anything about it in the docs.
On the other hand, you can try to access the webcam on desktop devices using ...
3
votes
Help for sorting cars that are 1 lap behind the others (latecomers)
Add a per car lap counter that increments when they hit the finish line.
That way you can sort the cars by that lapcount before you sort those with the same ...
3
votes
Topological sorting optimization
The video you linked already shows the solution I would suggest: split large objects into a standard tile size. This increases the overall number of objects, but allows you to use more standard sort. ...
2
votes
Fatal error in Game Maker: variable not set before reading it
Layers have to be referenced via their name, provided as a string. Try changing your create function in the step event to
...
2
votes
Accepted
Delta time causing comparison issues due to floating points
Your feeling is right, don't round your x at every frame because you need that value as an accumulator and it should remain accurate for a consistent simulation. ...
2
votes
Accepted
Issues making a gradient square in glsl es 2.0, Gamemaker Studio 2.0
Here's a WebGL implementation showing the same effect, which means it is the intended behaviour
That's just an optical illusion, the line isn't there. Let me magnify the image:
Your eye perceives ...
2
votes
Accepted
Collision detected at different times depending on speed?
The reason coloured cubes behave this way is because of how you treat collision check - it's not a bug, it's about setting up collision checking system.
Predicting collisions vs computing actual ...
2
votes
Accepted
Rotate a ds_grid 90 degrees in GMS2
As commented, you must change the arguments of the ds_grid_copy() function, for it isn't saving your calculations.
Taking a look at your code, I came up with a ...
2
votes
Accepted
How can I respawn enemies in Gamemaker Studio 2?
Since your enemies are destroyed and don't respawn instantly, you need a different object to spawn them using a timer.
I implemented this minimal working example, in which every time an enemy is ...
2
votes
What are the benefits or drawbacks of splitting the player animation system from the wall collision system into multiple objects pinned to each other?
I'll develop this answer as soon as I get more time and tell me if I'm off topic, I'm not really sure about what your actually asking. It's also one of my rare attempts to reply to a question, I'm ...
2
votes
Accepted
What are the benefits or drawbacks of splitting the player animation system from the wall collision system into multiple objects pinned to each other?
The approaches you described are both equally valid, but as always your best choice depends on what you want to achieve.
Defining "sub-systems"
Notice that collision and animation systems ...
2
votes
Tiledata management
2.000*2.000*32 bits of data, which is equivalent to 125 megabytes
First, let's use the correct units. You want to talk about mebibytes, not megabytes, as mebibytes is to a power of 2 value, proper to ...
2
votes
Game Maker Studio 2 problems with too many instances
GM:S is generally able to deal with as many instances as your machine is capable of handling, both in memory and CPU usage; every engine limitation is bonded to the machine the program is running on ...
2
votes
Accepted
Variable Problem when coding the Player Movement in GameMaker Studio 1.4.9999
Place_meeting is used to reach a different instance, so Solid should be the name of that instance it's colliding with. Your ...
2
votes
Do I need multiple exports from Game Maker to support Windows versions above 7?
I believe windows includes all the versions of windows, Windows 8 build is for functions specific to the windows 8 platform
2
votes
Accepted
How to scale image at runtime in GameMaker?
inst_inst.image_xscale = 0.1;
image_xscale is a property of an instance. image_index also ...
2
votes
Procedural terrain generation is very slow
I can see 2 possible reasons of bad performance:
You have very big numbers in X and Y. Like 2000*1000. In this way you must lower that. You can make bigger areas to generate (like 10*10 squares ...
2
votes
How would I create a multiplayer game owning a server?
A server that you own is nothing more than another PC running somewhere in the world 24/7.
Make a "headless" version of your game, that acts as a server, and has no graphics, only calculates the game'...
2
votes
Operating Expenses of Mathmetic Operations
You don't measure operations in time, because it only takes a couple of nanoseconds and it changes based on the CPUs clock speed. You should use cycles instead, these generally tell you how many steps ...
2
votes
Accepted
How to change the version code in application created by the GameMaker?
In Global Game Settings, inside the Android/Fire tab within the General section, there is a 3-components field to set the version of the apk.
Google Play detects automatically this setting to ...
2
votes
Accepted
How to make an object towards the mouse on one Axis - Gamemaker Studio 2
Just check where is the mouse based on the object's position:
if (mouse_y - y) > 0 {
y+=1;
} else if(mouse_y - y) < 0 {
y-=1;
}
This same code ...
2
votes
How to support more than 4 XInput controllers?
Xinput library only supports 4 controllers at a time - please refer to the wiki page on Directinput -DirectInput Wiki. May take some work, but you could enumerate some of the controllers under Direct ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
gamemaker × 447collision-detection × 25
gamemaker-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
optimization × 8
windows × 8
mathematics × 7
rendering × 7
glsl × 6
networking × 6
data-structure × 6
timer × 6
path × 6
shaders × 5
architecture × 5
ai × 5