Home

Awesome

EdynLogo

Edyn Testbed

Examples for the Edyn physics engine.

Dependencies:

Building

In the terminal, cd into the edyn-testbed directory and run:

$ conan install conanfile.txt -of=build
$ cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
$ cmake --build build -j16

You'll have to tell CMake where to find the bgfx libraries. 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 cloning the repo using Git Bash and assuming Conan 2.x is installed, enter the following commands:

$ conan install conanfile.txt -of=build
$ cd build
$ cmake .. -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake

The EdynTestbed.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