I'm a beginner and need some help about...

N

NowOrNever

Guest
Hello guys, I don't write or speak English very good but I think it is possible you understand me.
Well, few weeks before I started to watch some video tutorials about GameMaker Studio 2 and some times see something like this (gravity = 10) and in another video see like this (gravity = .5) and my question is What is the different between the first and the second? When use ( .5) or only 10?

Do you recommend any YouTube channel to learn about Game Maker Studio 2?
 
M

Master Summoner

Guest
This is a very very basic example:
If you're using GM's native physics engine, gravity simply determines how fast your object will fall until it collides with a solid object.

For example if you put a ball object in a empty room and set its gravity to 10, It will fall to the bottom of the screen pretty quickly.

If gravity is set to 0.5 it will fall very slowly (compared to gravity=10)

And if gravity to set to 0 the object will not fall.

This is all assuming you do not have any other code acting on the object.
 

TheouAegis

Member
Just like in the resl world, gravity is just an acceleration toward a direction:

hspeed += cos(gravity_direction) * gravity;
vspeed += sin(gravity_direction) * gravity
;

Sometimes people set vspeed to a very low number, like -100. Since this value is so high, gravity is also set really high (e.g., 10).
 

samspade

Member
Hello guys, I don't write or speak English very good but I think it is possible you understand me.
Well, few weeks before I started to watch some video tutorials about GameMaker Studio 2 and some times see something like this (gravity = 10) and in another video see like this (gravity = .5) and my question is What is the different between the first and the second? When use ( .5) or only 10?

Do you recommend any YouTube channel to learn about Game Maker Studio 2?
I would recommend Shaun Spalding, Friendly Cosmonaut, Gloomy Toad Studios, and Heartbeast. Especially the first three (they are much more focused on GMS 2).
 
Top