Skip to content

xissburg/edyn-testbed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EdynLogo

Edyn Testbed

Examples for the Edyn physics engine.

Dependencies:

  • EnTT (installed via Conan)
  • bgfx, bx and bimg are assumed to be cloned inside the same directory as edyn-testbed. This project is built using bgfx'es example framework thus it needs to be ran from the bgfx/examples/runtime directory to correctly load shaders and other files. In other words, bgfx/examples/runtime must be the working directory.
  • Git LFS is needed to download the resource files. You might have to run git lfs pull to bring in the files.

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.

simplescreenrecorder-2022-01-06_14.21.09.mp4
vehicle_networking-2022-04-01_23.39.11.mp4