Skip to content

Source-Authors/source-physics

Β 
Β 

Repository files navigation

Source Physics (VPhysics)πŸ› οΈ

Source Physics is Source's VPhysics default implementation which uses IVP/Havok engine.

As there are no sources, it was partially restored from the assembly by https://github.com/nillerusr, https://github.com/er2off, https://github.com/steadyfield, https://github.com/exstrim401, https://github.com/HappyDOGE, https://github.com/RaphaelIT7, https://github.com/PiMoNFeeD and others.

Features

VPhysics is mostly feature complete!

Below is a feature table of Volt vs VPhysics and the Bullet VPhysics project from VPhysics Jolt.

Feature VPhysics Volt (VPhysics Jolt) Bullet VPhysics
Constraints (except Pulleys) βœ”οΈ βœ”οΈ βœ”οΈ
Pulleys βœ”οΈ βœ”οΈ ❌
Breakable constraints βœ”οΈ ❌ ❌
Motors (Motion Controllers) βœ”οΈ βœ”οΈ βœ”οΈ
Motors (Constraint) βœ”οΈ βœ”οΈ ❌
Ragdolls βœ”οΈ βœ”οΈ βœ”οΈ
Triggers βœ”οΈ βœ”οΈ ❌
Object touch callbacks βœ”οΈ βœ”οΈ ❌
Prop damage/breaking βœ”οΈ βœ”οΈ ❌
Fluid events βœ”οΈ βœ”οΈ ❌
Prop splashing effects βœ”οΈ βœ”οΈ ❌
Wheeled Vehicles βœ”οΈ βœ”οΈ βœ”οΈ
Raycast Vehicles (ie. Airboat) βœ”οΈ ❌ 〰️ (janky)
NPCs/Doors (Shadow Controllers) βœ”οΈ βœ”οΈ βœ”οΈ
Save/Restore Support βœ”οΈ βœ”οΈ ❌
Portal Support βœ”οΈ βœ”οΈ ❌
Game per-object collide callback support
eg. no-collide
βœ”οΈ βœ”οΈ ❌
Crash-resistant solver ❌ βœ”οΈ (no data)
Supports thousands of objects without lag ❌ βœ”οΈ ❌
Multithreaded ❌ βœ”οΈ βœ”οΈ (partially)
Proper player controller βœ”οΈ βœ”οΈ βœ”οΈ (partially)

Bugs

VPhysics is not without its flaws, however. See the issue tracker for bugs that are known.

There are definitely going to be bugs that we don't know about or haven't encountered, or different quirks across engine branches.

How to build

The VPhysics code is provided as-is, it is up to you to build it for your SDK, etc.

VPhysics should build fine against Source SDK 2013 and Alien Swarm SDK on a MSVC, Clang or GCC compiler with at least C++17 support.

If you are building directly against the public SDK 2013 and Alien Swarm SDKs, you will need to do minor work to memoverride.cpp to make it compatible with the newer compilers and newer Windows SDKs.

About

Source 1 physics engine (restored from assembly)βš™οΈπŸ”„πŸ’§

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rich Text Format 69.3%
  • C++ 30.7%