Making a physics engine implementation

yes please

Iā€™d very much like to see an overview / snippet of this? :slight_smile:

Sorry ! I missed your message [quote=ā€œasser_fahrenholz, post:22, topic:35173ā€]
Iā€™d very much like to see an overview / snippet of this? :slight_smile:
[/quote]

It is available in the dyn4j integration branch of the alchemist project.

There are mainly four processors actualy used in the sample project :

PhysicWorldProc: creates a physic body for each entity holding a Physic and Stance component, then update the Stance component at each tick according to physic transform applied to the body. You could also update some Velocity components at this place, if you need to know the entity velocity in the entity system.
DraggingProc: adds a dragging force to the associated physic body of any entity holding the Dragging component.
CircleCollisionShapeProc: adds a circle collision shape to the associated physic body of any entity holding the CircleCollisionShape component.
EdgedCollisionShapeProc: adds a multi segment collision shape to the associated physic body of any entity holding the EdgedCollisionShape component and a Body one.

More detail on demand. donā€™t hesitate to PM if iā€™m too long to answer

2 Likes

Did you change the documentation on the dyn4j branch? There was an example of how to use it, but I canā€™t find it now. Perhaps I just misplaced the link or forgot to save it.

Or is there any other documentation of the dyn4j integration?

Much appreciated :slight_smile:

The dyn4j branch is a work in progress and I havenā€™t wrote any documentation specific to it. The only documentation is on the Alchemist repository wiki, which is 100% Alchemist related, while the dyn4j branch is specific to the top down sample project included with Alchemist.

But the integration so far is quite simple, and if you have questions about it, donā€™t hesitate to ask ^^

Ah, sry - I mixed up your implementation of Dyn4J with Finn Johnsonā€™s. Had to put in the right search terms in my history to find it.

Iā€™ll see if I can put your implementation to good use soon. Will come back to you if any questions/problems arise :smile:

Thanks.