#How to use game maker studio 2 manual#
Since most of the particle functions are pretty much self-explanatory (and the manual has most of the information that you require to use them), we are going to concentrate our attention on only a few details in this tech blog rather than create an example for you to play with (although you can download a little test project that shows some of these features at the end of the article).
#How to use game maker studio 2 series#
That's not to say that you can't have different properties for each particle or each particle group, because you can! You can set a series of flags for each group or particle which changes their physical properties in some way, and you can also assign each particle or group to a specific user category so that you can change their flags using the appropriate functions at any time without affecting other particles in the physics simulation.
So, if you use the function physics_particle_set_radius(radius) įor example, to change the radius of the particle, you will change the radius of all the particles already in the room (note that the particles that you create are really just single, circular fixtures and their global properties are pretty much the same as those that you would set for a regular fixture, like density, linear damping radius, etc. Now, in your physics games you should know that you can only have a single particle system, and that setting the global properties for that system will not only change all subsequent particles created, but those already in the game room. The particles themselves can be created on an individual level, or as a group, and you can set different properties for each particle or group, as well as set some global properties which will affect all particles. These previous tech blogs are not essential for completing this one, but if you haven't used physics before in GameMaker Studio 2 then it is highly recommended that you give them a read through before continuing, as this article assumes you already have a good working knowledge of the physics functions and of GML in general.Īs with the normal particle system (for creating graphics effects) the physics particles are designed to be a "fire and forget" system, in which you set up a series of properties and behaviours then create your particles and leave them to do their thing. If you haven't already read through the previous parts of this series, you can find them from the links at the very top of this article. This module is included as part of the GameMaker Studio 2 physics system and in this final tech blog in our series on using physics, we'll cover some of the things you can do with it. That doesn't man you can't do "soft body" physics simulations though! Some time ago those clever chaps at Google expanded the Box2D library to include their "Liquid Fun" module, which adds physics particles, and gives you the ability to create fluid-like particle simulations as well as particle based soft-bodies. However, they've all focused on what is known as "rigid body" physics, mainly because that is what the underlying physics engine "Box2D" does best. We've had three tech blogs now about the GameMaker Studio 2 physics system and how it permits you to create fast and efficient physics simulations in your projects.