Home

Awesome

EdynLogo

Edyn Testbed

Examples for the Edyn physics engine.

Dependencies:

Building

In the terminal, go into the edyn-testbed directory and do:

$ mkdir build
$ cd build
$ conan install ../conanfile.txt
$ cmake ..
$ make

You might have to tell CMake where to find the bgfx and Edyn libraries. For bgfx, just set Bgfx_LIBRARY_DIR to the directory where the bgfx libraries are located and CMake should find and assign all of them.

Windows and Visual Studio 2019

After running cmake .., the Edyn.sln solution should be in the build directory. It's important to set the working directory by going to the EdynTestbed target properties (Alt Enter) and under Configuration Properties > Debugging > Working Directory assign the bgfx examples runtime directory, such as $(ProjectDir)..\..\bgfx\examples\runtime.

Sounds

Some samples include sound effects, played via SoLoud. To enable sounds, set the CMake option EDYN_SOUND_ENABLED to true. You will have to link SoLoud and SDL2.

It uses these sounds from freesound:

Networked physics

To build the networked physics samples, set the CMake option EDYN_BUILD_NETWORKING_EXAMPLE to true and to build the server applications, set EDYN_BUILD_SERVER to true. The networked physics samples and the servers need the ENet library.

The servers are separate applications. Each distinct networking sample has a server associated with it and the server must be running before the sample is selected in the sample browser so it can connect to server. If the server is running in a different machine, it's necessary to edit the host name is the calls to ExampleBasicNetworking::connectToServer.

Running it

Press P to pause/unpause the simulation. Press L to step the simulation when paused.

https://user-images.githubusercontent.com/762769/148439511-9dad8f36-182c-43e7-af91-bdd43f430965.mp4

https://user-images.githubusercontent.com/762769/161366613-565b2dff-1d91-4fa1-8691-dbb5ae8abbff.mp4