blade2xs

Physics: Arcade vs Impact vs Matter

Recommended Posts

Hey everyone,

I looked around for details on this but I am trying to determine the difference between the Physic types: Arcade, Impact, Matter to see what would be best for my type of game or to experiment with.

I read in the Dev blogs that "Arcade" was meant for very simple physics in a game, while somewhere else I read that "Matter" was meant for debugging... I would like to know what the real differences are and which would make the most sense for a given game type.  Does anyone know what the differences between the Physic types are?

 

Thanks!!!

Share this post


Link to post
Share on other sites

OK Update :)

Matter physics seems to allow for more complex and advanced physics bodies and constructs while Arcade is just meant for simple physics where as Impact is specific if you are using ImpactJS

Share this post


Link to post
Share on other sites

Arcade is a custom physics engine used in Phaser. The only body types it supports are axis-aligned rectangles (i.e. rectangles with no rotation) and circles. This makes its collision quite rudimentary, but quite fast - check out the Mass Collision Test example to see just how many bodies it can handle before it starts to struggle. Other than that, it gives you most things you'd expect from a physics engine - angular velocity, drag, acceleration, etc. It's also quite flexible; if you want to, it allows you to manually handle most aspects of collision, which can make it almost as powerful as other engines when combined with libraries such as SAT.js. Personally, I prefer Arcade in most cases because of its efficiency.

Impact, as far as I'm aware, is the physics engine used by the Impact game engine. Out of the three physics engines in Phaser, I've got the least experience with Impact, but the examples for it should show you what it can do. One of its advantages over Arcade is the ability to have slopes in tilemaps, but it looks like it only supports Weltmeister maps (that's Impact's map editor), not Tiled or any other standard format.

Matter.js is a third-party physics library. Unlike the other two, it's not intended for games, but for general-purpose use, which is why it's very powerful but not suitable for some types of games. More features and more flexibility necessitate more complicated logic, which obviously makes the engine slower. I'd only recommend Matter.js for cases in which you absolutely need realistic collision (Matter.js can simulate things like Newton's cradles) or complex body shapes.

Share this post


Link to post
Share on other sites
On 2/16/2019 at 9:41 PM, Telinc1 said:

Arcade is a custom physics engine used in Phaser. The only body types it supports are axis-aligned rectangles (i.e. rectangles with no rotation) and circles. This makes its collision quite rudimentary, but quite fast - check out the Mass Collision Test example to see just how many bodies it can handle before it starts to struggle. Other than that, it gives you most things you'd expect from a physics engine - angular velocity, drag, acceleration, etc. It's also quite flexible; if you want to, it allows you to manually handle most aspects of collision, which can make it almost as powerful as other engines when combined with libraries such as SAT.js. Personally, I prefer Arcade in most cases because of its efficiency.

Impact, as far as I'm aware, is the physics engine used by the Impact game engine. Out of the three physics engines in Phaser, I've got the least experience with Impact, but the examples for it should show you what it can do. One of its advantages over Arcade is the ability to have slopes in tilemaps, but it looks like it only supports Weltmeister maps (that's Impact's map editor), not Tiled or any other standard format.

Matter.js is a third-party physics library. Unlike the other two, it's not intended for games, but for general-purpose use, which is why it's very powerful but not suitable for some types of games. More features and more flexibility necessitate more complicated logic, which obviously makes the engine slower. I'd only recommend Matter.js for cases in which you absolutely need realistic collision (Matter.js can simulate things like Newton's cradles) or complex body shapes.

Would you share a basic example of using SAT.js in phaser arcade phiysic please?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.