• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language Pascal
  • Created over 9 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Kraft Physics Engine is an open source Object Pascal physics engine library that can be used in 3D games.

Kraft Physics Engine

Kraft Physics Engine is an open source Object Pascal physics engine library that can be used in 3D games.

Author : Benjamin 'BeRo' Rosseaux

Compatible with: Delphi 7-XE7 (but not with the Android and iOS targets), FreePascal >= 2.6.2 (with almost all FPC-supported targets including Android and iOS)

Support me

Support me at Patreon

Features

Kraft Physics Engine has the following features:

  • Rigid body dynamics
  • Discrete collision detection
  • Optional additional continuous collision detection with Motion Clamping or with Box2D-style time of impact sub stepping, either with Bilateral Advancement or Conservative Advancement.
  • Optional additional support for speculative contacts as faster and more inaccurate fake continuous collision detection mode.
  • Full one-shot contact manifold collision shapes (spheres, capsules, convex hulls, boxes, and for static geometries also triangle meshes) based on combinations of for-warm-start-simplex-caching-able GJK, Gauss-Map optimized Clipping-SAT and implicit collision algorithms.
  • Optional MPR-based (Minkowski Portal Refinement) incremental persistent contact manifold work mode (see TKraft.PersistentContactManifold boolean), but its usage isn't recommended, because the full one-shot contact manifold work mode is faster, more robust and more tested. It is implemented only as comparison reference (for example for debugging purposes), and for more reasons against incremental persistent contact manifold real usage, see http://media.steampowered.com/apps/valve/2015/DirkGregorius_Contacts.pdf .
  • Multiple collision shapes per rigid body without the need for a compound shape
  • Broadphase collision detection with a dynamic AABB tree
  • Fast mid phase for static triangle mesh geometries
  • The choice of either Box2D-style post position correction/projection or alternately baumgarte stabilization
    • Post position correction/projection is slower but it's more precise, so it's also the default enabled setting
    • Baumgarte stabilization (which is also the old-school way) is faster but it can be inaccurate in some situations
  • Narrowphase collision detection
  • Collision response and friction (Sequential impulses with post projection)
  • Joint constraints (Grab, Distance, Rope, Ball Socket, Hinge, Slider, Fixed)
  • Collision filtering with groups
  • Ray casting and sphere casting (ray "with" spherical thickness)
  • Sleeping of inactive rigid bodies
  • Island-based multithreading
  • It can be used also for 1D and 2D physics, and not only for 3D physics
  • SIMD optimizations for x86-32 and x86-64

Future possibly possible features

  • Linear casting
  • More joint constraint types (for example cone twist, universal and/or general 6DOF)
  • Cloths / Soft body

License

The Kraft Physics Engine is released under the open-source ZLib license.

PasMP

For to use Kraft with PasMP, you must set a project global define called KraftPasMP (or use -dKraftPasMP as compiler command line parameter)

Documentation

Later . . .

Branches

The "master" branch contains the development state of the physics engine, which is frequently updated and can be quite unstable. The "release" branch contain the last stable released version and some possible bug fixes, which is then the most stable version.

Issues

If you find any issue with the library, you can report it on the issue tracker here.

More Repositories

1

besen

Complete ECMAScript Fifth Edition Implemention in Object Pascal
Pascal
215
star
2

pasvulkan

Vulkan header generator, OOP-style API wrapper, framework and prospective Vulkan-based game engine for Object Pascal
Pascal
191
star
3

pasmp

PasMP - a parallel-processing/multi-processing library for Object Pascal
Pascal
112
star
4

flre

FLRE - Fast Light Regular Expressions - A fast light regular expression library
Pascal
94
star
5

rnl

RNL - Realtime Network Library - The opensource reliable UDP network library
Pascal
84
star
6

pacc

PACC (PAscal C Compiler) is an C compiler, which is implemented in Delphi-7-compatible Object Pascal
Pascal
64
star
7

berotinypascal

A self-hosting capable tiny pascal compiler for the Win32 x86 platform
Pascal
55
star
8

crosspascal

CrossPascal aims to be a Delphi 7 compatible cross-platform source-to-source compiler which generates intermediate C code.
Pascal
43
star
9

pasgltf

An Object-Pascal-native GLTF 2.0 low-level-data loader and writer for GLTF and GLB files
Pascal
33
star
10

pasjson

A unified JSON library for both Object-Pascal ecosystems (Delphi and FreePascal)
Pascal
31
star
11

sasm

SASM - Scriptable ASseMbler - A x86 assembler with ECMAScript as (additional) macro language as an optional compile-in-option
Pascal
27
star
12

pashtmldown

PasHTMLDown MarkDown Libary
Pascal
25
star
13

br808

BR808 is a originally demoscene-originated software synthesizer, which became a bit too big for 64k intros.
Pascal
20
star
14

pucu

PUCU Pascal UniCode Utils Libary
Pascal
17
star
15

poca

Yet another scripting language
Pascal
16
star
16

pasenet

Pascal port of ENet with IPv6 support
Pascal
16
star
17

brre

yet another efficient, principled regular expression library
Pascal
15
star
18

micro64disktool

A c64 diskette image converter tool
Pascal
12
star
19

pasdblstrutils

Pascal library for cross-compiler consistent and exact conversion between double-precision floating point number values and strings
Pascal
10
star
20

pasmultilang

An cross-compiler Object Pascal unit for internationalization and localization
Pascal
10
star
21

tine

TINE (This is not EFI) - A fake-(U)EFI boot loader for pure BIOS environments
Assembly
5
star
22

pasvulkan_old

PasVulkan with the full old too big history
Pascal
3
star