Are Physics Behaviors in games like Space Engineers possible in Game Maker?

S

Straith Del

Guest
Of course, apologies if this was answered somewhere fully. I wasn’t able to find it.

A project that I have been toying around with involves physics objects that can be attached to each other and hopefully act as a single grid. There are a multitude of 3D games that involve building “vehicles” by attaching blocks either to each other or onto a grid object that contains the logic and such for the whole “vehicle”. A great example is Space Engineers (available on Steam), and there are so many 2D games (Reassembly, Celestial Commands, etc. on Steam) where you can build custom ships that are significantly less strenuous than 3D Space Engineers. The blocks have physics and collide with other ships, and it’s really satisfying to play them, making small and fast ships to dominating capital ships (as big/numerous as the game can handle, of course).

However, in Game Maker, as wonderfully useful as the physics in it are, the physics joints like “weld” and “wheel” just seem to attach wobbly rubber bands to the physics blocks (objects). When I attach a dozen or so and actually give them weight, it becomes clear that I’m either doing something EXTREMELY wrong to attach them, or that the physics engine is just incapable of attaching blocks together in a simple rigid fashion. Making the connections more rigid creates an infinite loop where one block moves the central object, forcing another to compensate, moving the shared central object again and the whole thing spazzes out (yet still doesn’t penetrate the wall objects in the room! Impressive.).

In summary, I see so many games that have the behavior of building ships, from (likely deceptively) simple 2D games to very complicated and intensive 3D games. I would hope it being 2D from the start should make this possible.

Is Game Maker capable of this behavior? Or can I not make that kind of game here?

I’ve wondered this for months and I finally decided to ask you all. Thank you very much for your time!
 
Hello homie G dawg. I have extensive experience using box2d physics in game maker. It can seem a little janky at first but if used properly it is actually an extremely versatile and robust engine for game creation. There are a few things that can be tweeked to fix the problem you're having. Increasing the damping ratio and the occilation frequency will make your weld joints more ridged. Also increasing the physics world update itterations and the physics world update speed will make things more precise. You can also reduce the pixels to meters ratio scale to increase the max speed of your physics objects.
 
S

Straith Del

Guest
Thank you very much for your reply! I messed around with those values, and I learned how to make more rigid connections. I feel that using this method in this circumstance, I have managed to maximize the rigidity as game maker allows. One of the best things I found was to increase the frequency to just under half of the physics step time.

I then tried reducing the masses of all of the objects with the mindset that the forces exerted on the objects by the welds would be stronger. Of course, it isn’t how the engine works. Behavior did not change. Making everything extremely massive changed nothing either.

I will continue to experiment with this. However, the ultimate goal is to make something that can be comprised of hundreds of blocks and act as a rigid unit. Currently, the engine just tries to push blocks back into a world, instead of them being truly rigidly attached. It works with a dozen of light objects, and can be extended to two dozen heavy objects.

Is there a way to make them truly rigid, where they will not move relative to one another? Perhaps, is there a way to make multiple physics objects act as a single object?

Thanks again!
 

FrostyCat

Member
Then you may want a single instance bound to multiple fixtures, similar to the 6-pointed star from this tutorial. Even though a bunch of welds may be stronger than one, there's still a limit to how much force it can counteract. But no amount of force can pull apart fixture positions.
 
Top