Experimenting with physics using the ezEngine for the lecture Game Physics by Prof. Dr. Roland Schmitz and Andreas Stiegler at Hochschule der Medien Stuttgart.
- Python 3.4 or later
- Visual Studio 2013 or later
- ezEngine Milestone 5, i.e. commit 3fe9867d6da8d46af99c5a8c864ee4b8f19148e7
- Needs CMake version 2.x (2.8 recommended)
- Either
Debug
orRelWithDebInfo
builds
- OpenGL 2.0 or later
- GLEW 1.11.0 or later
- Create an environment variable
EZ_ENGINE_DIR
which points to the top-level directory of the ezEngine repo/installation, e.g.C:/data/projects/3rdparty/ezEngine/
. - Create an environment variable
OPENGL_GLEW_DIR
which points to the top-level directory of the GLEW installation, e.g.C:\data\projects\3rdparty\OpenGL\glew-1.11.0
- Make sure the directories
bin
,lib
, andinclude
are located directly under that
- Open
Build/VisualStudio/GamePhysics.sln
using Visual Studio 2013 and build the any of projects within theApps
Solution Folders using either theDebug
orRelease
configuration in 32 or 64 bit.
If I find the time, I will try to make this project run on Linux using GCC or Clang. Using CMake, of course...
- ezEngine
- OpenGL and GLEW 1.11.0
The first sample I built. You simply click to spawn a particle, and click again to give it some linear velocity, according to the mouse position and the particle position.
The idea is to spawn a particle in the lower left spawn area, marked in red, and trying to hit the yellow circle on the top-right (the sun, if you want). The challenge here is that those gray circle are applying a linear acceleration to you particle, as long as you touch them.
This sample demonstrates the effect of different inertia tensors for the same shape. They use the same inertia tensor (solid cuboids) but with different mass and spatial distribution values, according to their size and the column row they're located in. Of course, the screenshot doesn't say much about how fast each object is rotating because, well, it is just a screenshot. 😃
Some spheres colliding with each other!